Commit graph

2983 commits

Author SHA1 Message Date
Zack Galbreath
072f907831 Add CDash as a valid reporting format 2018-05-15 05:43:07 -07:00
Zack Galbreath
e4e8c72fa1 Initialize report generator before parsing specs
This will allow us to generate reports for concretization errors
2018-05-15 05:43:07 -07:00
Zack Galbreath
de01d70ae4 Allow --overwrite and --log-format to be used together
Restructure the logic of the spack install command to allow these two
command-line arguments to be used at the same time.
2018-05-15 05:43:07 -07:00
Zack Galbreath
6c5dbdd9cd Format-agnostic data structure for reports
Replace the JUnit-specific terms 'testsuite' and 'testcase' with
'spec' and 'package', respectively.
2018-05-15 05:43:07 -07:00
Massimiliano Culpo
b4859e10e2 Packages can tune the list of files to be archived at the end of install (#7760)
Fixes #2781

This PR introduces a new attribute for packages called
`archive_files`, which designates files that should be saved from
a package build (e.g. the config.log generated during autotools
builds).

The attribute contains a list of glob expressions; Any file that
matches will be archived in the `<prefix>/.spack/archived-files`
directory. Errors that occur when archiving files are collected and
reported in a file named `<prefix>/.spack/archived-files/errors.txt`.

`AutotoolsPackage` and `CMakePackage` provide a sensible default
override for this attribute.
2018-05-08 17:40:53 -07:00
Massimiliano Culpo
ff3205d21e
Specs add a space before dependencies (#7942)
fixes #7941

Modified string representation of Specs to add a space before deps
Unit-tests have been modified accordingly
Added a test for regression on #7941
2018-05-07 09:05:50 +02:00
健美猫
c451644f12 Support *.TAR.gz extension. (#7973) 2018-05-06 09:34:16 -05:00
Adam J. Stewart
3a29cc3f5c
Fix coloring of URLs containing @ symbol (#7799)
* Fix coloring of URLs containing @ symbol

* Fix coloring of descriptions containing @ symbol
2018-05-05 17:27:40 -05:00
Adam J. Stewart
5af4d4f0ac
Set default provider for every virtual package (#7784)
* Set default provider for every virtual package

* Add unit test to ensure that every virtual package has a default provider explicitly set
2018-05-05 17:26:47 -05:00
scheibelp
d17372290d
Fix initialization of defaults in yaml schema validation (#7959)
Fixes #7924

Spack's yaml schema validator was initializing all instances of
unspecified properties with the same object, so that updating the
property for one entry was updating it for others (e.g. updating
versions for one package would update it for other packages).

This updates the schema validator to instantiate defaults with
separate object instances and adds a test to confirm this behavior
(and also confirms #7924 without this change).
2018-05-01 17:23:27 -07:00
Adam J. Stewart
c1febf8d9c Document how to run unit tests with print statements (#7860) 2018-04-28 17:59:33 +02:00
Chris Green
6cc79f8142 Allow len(Version) to return number of split components. (#7918) 2018-04-26 15:38:43 -07:00
serbanmaerean
963c103a67 XL Fortran compiler >= 16.0 is synced with C compiler version (#7887)
* Use reported version of IBM XL Fortran compiler for compiler versions >= 16.0.

Starting with the April 2018 release, the IBM XL C and Fortran compilers report the same version, 16.0.  Consequently, there is no need to downgrade the Fortran compiler version to match that of the C compiler.
2018-04-26 14:50:14 -07:00
Sergey Kosukhin
0f35f00b6e Use GitLab's API endpoint for fetching a git snapshot. (#7881)
* Use GitLab's API endpoint for fetching a git snapshot.

* More GitLab packages use the API.

* find_list_url for GitLab's API URLs.

* Flake8

* Url for 'hacckernels'.

* Check GitLab API regexps before the non-API ones.
2018-04-26 16:40:11 -05:00
健美猫
9dad069e89 config_args does NOT apply to CMakePackage. (#7917) 2018-04-26 13:03:45 -05:00
Matthew Scott Krafczyk
1b38631781 Add -d option to diy to specify source path move -j to common args (#5963) 2018-04-18 17:26:14 -05:00
Elizabeth Fischer
d3c1463b0a Fix bug/oversight in formatting error message. (#7810) 2018-04-18 15:05:37 -05:00
George Hartzell
669b85e6bc Activation of activated package just msg's (#7752)
Activating a package that is already activated now sends a `tty.msg`
and returns.

```
-bash-4.2$ ~/spack/bin/spack activate aspell6-en
==> Package aspell6-en/lc4v24f is already activated.
```
2018-04-17 07:44:08 -05:00
Massimiliano Culpo
4bf7ce7d99 Better error message for spack providers (#7748)
* Better error message for spack providers

fixes #1355

`spack providers` now outputs a sensible error message if non-virtual
specs are provided as arguments:
```
$ spack providers mpi zlib petsc
==> Error: non-virtual specs cannot be part of the query [zlib, petsc]
```

Formatting of the output changed slightly.

* Calling 'spack providers' without arguments print the virtual pkg list

Also, the error message in case of a wrong parameter has been improved
to show the list of valid packages.

* Avoid printing headers if stdout is not a tty

* The provider list is formatted with colify if not in a tty

* Added a test to check the list of providers returned from the command
2018-04-17 07:30:32 -05:00
Cameron Smith
e6d3ab8405 cray: add comment about module use in packages.yaml (#7751)
This advises users to prefer `modules:` entries in `packages.yaml` on Cray.
2018-04-13 11:53:26 -07:00
becker33
b9c8cdcbe3
Fix when_spec inheritance for extensions (#7746)
Popping the when spec from kwargs in the extends directive breaks
class inheritance. Inheriting classes do not find their when spec.

We now get the when spec from kwargs instead, leaving it to be found
by any downstream package classes.
2018-04-13 11:38:34 -07:00
Massimiliano Culpo
1307ad3979
Package.provides account for v deps that are provided conditionally (#7716)
fixes #7705

Package.provides now checks constraints to ensure that a spec provides
a given virtual package. Note that 'strict=True' is not passed to
satisfies as this function is also used during concretization.
2018-04-11 21:50:03 +02:00
healther
6a0f9ccf82 make view understand hashes (#7573)
Fixes #7548

This updates the "spack view" command to use the same parsing logic
as "spack install" on the user-provided specs. For example you can
provide a DAG hash to refer to an exact installed spec instead of
specifying name, compiler, etc.
2018-04-04 10:40:56 -07:00
Adam J. Stewart
c50628ebdf Fix bug in test_find_with_globbing unit test (#7652) 2018-04-03 22:27:17 -07:00
Zack Galbreath
f613437a44 Do not call sys.exit() in except block (#7659)
When an invalid spec is encountered by `parse_specs()` we now raise a
`SpackError` instead of calling `sys.exit()`
2018-04-03 22:22:28 -07:00
Adam J. Stewart
cdefbd7475 Avoid double 'lib' for packages whose name already starts with lib (#7651) 2018-03-31 17:33:41 +02:00
Axel Huebl
4c6199923e mirrors.yaml: does not expand ~ (#7631)
Use `$HOME` for cli commands in `mirrors.yaml` and add
"username" example strings in the file itself.
2018-03-28 14:30:18 -05:00
Patrick Gartung
52d55ea317 Fix buildcache relocate: only skip if rpaths are relative (#7605)
This fixes a check that decides when to skip buildcache relocation.
Originally the check was flawed in two ways: it would skip if the
source prefix matched the destination prefix, which no longer
matters since the source prefix is replaced with a placeholder
(so it always needs to be updated); it also would skip relocation
if the rpaths were not relative, when in fact it should be the
opposite (binaries without relative rpaths *should* be relocated,
and those without don't need it).
2018-03-27 10:54:26 -07:00
Todd Gamblin
54f97d1dec
Update copyright on LLNL files for 2018. (#7592) 2018-03-24 12:13:52 -07:00
Todd Gamblin
af0f94a1af
Avoid stat-ing all packages at startup. (#7587)
- FastPackageChecker was being called at startup every time Spack runs,
  which takes a long time on networked filesystems.  Startup was taking
  5-7 seconds due to this call.

- The checker was intended to avaoid importing all packages (which is
  really expensive) when all it needs is to stat them.  So it's only
  "fast" for parts of the code that *need* it.

- This commit makes repositories instantiate the checker lazily, so it's
  only constructed when needed.
2018-03-24 07:39:10 -07:00
Todd Gamblin
998b5a6482
Remove case consistency check at startup. (#7585)
- This was needed when we transitioned to all lowercase packages because
  git didn't handle case changes well on case-insensitive filesystems.

- Now it just adds extra stat calls to startup, and we check for
  all-lowercase package names in tests, so we'll remove it.

- people using really old versions of Spack can re-clone.
2018-03-23 22:38:31 -07:00
Mario Melara
385622953d Cray clean environment (#7582)
* Create unload_module method

Extract code from load_module into unload_module.

* Unload modules to create a clean env on Cray

removes cray-libsci, cray-mpich and darshan to prevent any silent
linking with those packages.
2018-03-23 14:53:52 -07:00
Adam J. Stewart
666e8e3a9b Increment Spack version (#7565) 2018-03-23 14:43:22 -07:00
becker33
1c169ead8b
Grab crayos version from PrgEnv module versions (#7583) 2018-03-23 14:41:43 -07:00
Mario Melara
2970a50ef6 Add the ability to separate architecture in path scheme (#4329)
* Add format to separate target and os for path

spec format can now handle separations of target and os for setting
up the path.

* Added ${PLATFORM} et al to spec.format()

${PLATFORM}, ${OS}, ${TARGET}

* Update tests

Updated tests and got rid of unnecessary code.

* Also update documentation to reflect this new ability.

* Add default path scheme to config.yaml

Added default path scheme to config.yaml. Users can overwrite this
section if they want.
2018-03-23 12:05:07 -07:00
Veselin Dobrev
4ddbc96c7b Speedup the default 'libs' property search ... (#7553)
* Speedup the default 'libs' property search - important for external
packages.

* As advised by @alalazo, use tuples instead of lists inside
_libs_default_handler.
2018-03-22 20:04:28 -05:00
Adam J. Stewart
f721fb3e4c
Fix error raising during install with Python 3 (#6894)
* Fix error raising during install with Python 3

* Fix env_path too
2018-03-22 19:37:49 -05:00
Massimiliano Culpo
5655895865 Record installation date and time in DB (#7334)
* Added installation date and time to the database

Information on the date and time of installation of a spec is recorded
into the database. The information is retained on reindexing.

* Expose the possibility to query for installation date

The DB can now be queried for specs that have been installed in a given
time window. This query possibility is exposed to command line via two
new options of the `find` command.

* Extended docstring for Database._add

* Use timestamps since the epoch instead of formatted date in the DB

* Allow 'pretty date' formats from command line

* Substituted kwargs with explicit arguments

* Simplified regex for pretty date strings. Added unit tests.
2018-03-22 11:07:27 -07:00
Massimiliano Culpo
6699ba8769 Recover the old patching order for packages. (#7558)
fixes #7543

This is very likely an hot-fix, while a more permanent solution is
needed. See this comment for more insight:

 https://github.com/spack/spack/pull/7193#discussion_r176448831

on the problem.
2018-03-22 10:09:43 -07:00
becker33
f8657e3fd9 Propagate architecture information during concretization (#7412)
This updates architecture concretization to

* Search for the nearest parent in the DAG for architecture information
  rather than defaulting to the root of the DAG
* Propagate architecture settings transitively, such that if for
  example the target is set at the root of the dag it will set the
  same target on indirect dependencies (assuming no intermediate
  dependency specifies a separate target). Previously this occurred
  in general but under some conditions did not, for example if an
  intermediate dependency specified some subset of architecture
  properties.
2018-03-21 18:14:01 -07:00
scheibelp
6548f2db5c Enable creation of mirrors for systems with different compilers (#5153)
* Create mirror for system with different compilers

Spack concretizes the spec provided by the user in
"spack mirror create" to ensure downloading the right
dependencies. Under normal circumstances concretization
requires that the chosen compiler exists on the system,
but this is not required when creating download mirrors
for other systems, so this requirement is removed in that
case.

* Add test for disabling compiler existence check

* Update compiler existence checking logic

* improve test for disabling compiler existence check
2018-03-21 14:55:26 -07:00
健美猫
71055a8ef4 Generate spack docset for Dash. (#6981) 2018-03-21 16:37:26 -05:00
Gregory Lee
7504e9997d make py-setuptools a run-time-only dep for py-basemap and patch pytho… (#6989)
* make py-setuptools a run-time-only dep for py-basemap and patch python package to only apply setuptools flag for build deps

* py-qtconsole does not require setuptools
2018-03-21 16:34:27 -05:00
scheibelp
e8a0637606 Support MD5 with a warning when OpenSSL is compiled in FIPS mode (#7531)
* This allows Spack to work with MD5 hashes on machines with openssl in FIPS mode.
* We are still using MD5 for validation in many places, and a later PR will replace all uses of MD5 with SHA256.
* This is a quick fix until that happens.
2018-03-21 14:11:54 -07:00
Gregory Lee
500ac793bc patch config.guess for ARM (aarch64) (#7427) 2018-03-21 13:13:38 -05:00
Peter Scheibel
6458b15bb1 spec: support "full" hashes
This hash includes the content of the package itself as well as the DAG
for the package.
2018-03-20 00:29:54 -07:00
Peter Scheibel
3501f2f4b5 package: add a content_hash method for packages
This calculates a hash which depends on the complete content of the
package including sources and the associated `package.py` file.
2018-03-20 00:29:54 -07:00
Peter Scheibel
e97c28e5b3 package: ensure patches are applied in-order
This helps to ensure that patches are applied consistently and will also
be used as the source for the patch part of full package hashes.
2018-03-20 00:29:54 -07:00
Peter Scheibel
2379ed54b9 package_hash: add code to generate a hash for a package file
This will be included in the full hash of packages.
2018-03-20 00:29:54 -07:00
Peter Scheibel
db81d19ddd PackageBase: add a list of metadata attributes
These attributes are ignored when doing a content hash of a package.
2018-03-20 00:29:54 -07:00
Peter Scheibel
39cb9d0397 fetch_strategy: add a source_id to fetches
This will be included in the full hash of packages.
2018-03-20 00:29:54 -07:00
Todd Gamblin
b4a9e37a98
Fix bugs in spack dependencies command (#7435)
- transitive dependencies were not being handled correctly

- restructure code to do recursion and mark visited packages properly

- add `-V` option to *not* expand virtuals in spack dependencies
2018-03-12 17:26:58 +09:00
Massimiliano Culpo
a1c8ce82f2 Constructing a SpecBuildInterface from another gives no inconsistent MRO (#7457)
fixes #7239
2018-03-12 17:07:08 +09:00
Patrick Gartung
a4e75c7f0e spack buildcache: allow unsigned tarballs (#7440)
This re-adds the option to create and install unsigned tarballs, now
with the -u option (--unsigned) rather than the -y option.

This also changes the "keys" command, replacing the -y/--yes-to-all
option with the -t/--trust option (which has the same effect but is
more-clearly named).
2018-03-09 15:29:10 -08:00
Levi Baber
38bb0e3e7d resource: convert symlink to real path (#7417)
Fixes #7130

shutil.move expects a source path like "/x/y/" to be a directory and
fails if "/x/y" is a symlink. This invokes realpath on the source
path to avoid the issue.
2018-03-09 12:40:57 -08:00
scheibelp
f27f20e5b3
replace dash with underscore in os name/version (#7381)
Fixes #7356

In some cases OperatingSystem (e.g. LinuxDistro) was getting
instantiated with a version that contains dashes. This breaks because
the concretizer later converts this value to a string and re-parses
it, and the '-' character is used to separate architecture components.
This adds a guard in the initializer to convert '-' to '_'.
2018-03-09 10:03:58 -08:00
Massimiliano Culpo
d77dd298eb
Changed CudaPackage base class to PackageBase (#7416)
CudaPackage is always used as a mixin. As such it should inherit from
PackageBase, and not Package.
2018-03-07 13:45:11 +01:00
Patrick Gartung
f5467957bc Improved binary relocation: error checking and reporting (#7314)
Fixes #7237
Fixes #6404
Fixes #6418
Fixes #6369

Identify when binary relocation fails to remove all instances of the
source prefix (and report an error to the user unless they specify
-a to allow the old root to appear). This check occurs at two stages:
during "bincache create" all instances of the root are replaced with
a special placeholder string ("@@@@..."), and a failure occurs if the
root is detected at this point; when the binary package is extracted
there is a second check. This addresses #7237 and #6418.

This is intended to be compatible with previously-created binary
packages.

This also adds:

* Better error messages for "spack install --use-cache" (#6404)
* Faster relocation on Mac OS (using a single call to
  install_name_tool for all files rather than a call for each file)
* Clean up when "buildcache create" fails (addresses #6369)
* Explicit error message when the spack instance extracting the binary
  package uses a different install layout than the spack instance that
  created the binary package (since this is currently not supported)
* Remove the option to create unsigned binary packages with -y
2018-03-06 18:02:53 -08:00
Mario Melara
ccb24b1438 Fix pkgconf on Crays (#7171)
This updates Cray.setup_platform_environment to use cray-specific
pkgconfig paths so that all providers of 'pkgconfig' have access
to them (previously the 'pkg-config' provider had this but the
'pkgconf' provider did not).
2018-03-05 12:08:11 -08:00
scheibelp
8b0552bc23 only filter compiler paths for binaries provided by the compiler (#7369) 2018-03-05 14:43:43 +01:00
Veselin Dobrev
d3ed46e958 [spack/spec.py] raise a query failure error if a property query returns None (#7277)
* [SPACK/spec.py] When a query through ForwardQueryToPackage returns
'None', treat that as query failure and raise RuntimeError with
suitable message. This overrides the current behavior to raise an
AttributeError which is now triggered only when no suitable query
property is found and there is no default handler.

* [spack/spec.py] Fix style.

* [SPACK/spec.py] In case of query failure, i.e. property returning
'None', raise AttributeError instead of RuntimeError in order to
pass the unit test. Also, small update in the logic distinguishing
query failure and lack of relevant property/attribute handling.
2018-02-28 15:25:29 -07:00
Mario Melara
14e3eb78a7 Fix class name in build system tutorials (#7346)
AutoTools -> Autotools
2018-02-27 20:15:35 -08:00
Omar Padron
3a9cd2614e Docker-Based Developer Resource (#5871)
* add docker-based development resources

* incorporate feedback from @ax3l

* fix docs/improve ssh handling

* experiment with custom prompt

* add arch/fix missing core_compilers key

* add centos/minor tweaks

* make prompt experiment optional

* workaround problem with latest fedora docker image

* add docker documentation page to index toc

* try another documentation fix

* switch arch linux base to base/archlinux

* update the git urls in the Dockerfiles

* add opensuse

* switch CUSTOM_PROMPT variable to simply "PROMPT"
2018-02-27 00:36:14 -08:00
Massimiliano Culpo
9c7d4e34f7 Pin Sphinx version to v1.7.0 (#7337)
Later versions of Sphinx fail due to possible clashes with our custom
argparse.
2018-02-23 12:09:01 -08:00
scheibelp
4a807fca08
Make fix_darwin_install_name python3-compatible (#7329)
This updates the fix_darwin_install_name function to use the Spack
Executable object to run install_name_tool, which ensures that
process output is formatted as a 'str' for python2 and python3.
Originally fix_darwin_install_name was invoking subprocess.Popen
directly.
2018-02-23 10:24:59 -08:00
Pramod S Kumbhar
8ae50ae8bb Use abspath to avoid permission errors(#7241)
Fixes #5189

When working with non-normalized paths containing ".." on some
file systems, Spack was found to encounter a permission error when
writing to the path. This normalizes a path written by the
intel-parallel-studio package and also normalizes all paths
written by the license install hook (for all packages) to avoid
this issue for intel-parallel-studio.
2018-02-15 17:26:37 -08:00
alalazo
efd2a95781 find has been changed to accept glob expressions
Following the discussion with Todd and Adam, find has been modified to
accept glob expressions. This should not affect performance as every
glob implementation I inspected has 3 cases (no wildcard, wildcard but
no directories involved, wildcard and directories involved) and uses
fnmatch underneath.

Mixins have been changed to do by default a non-recursive search (but
a recursive search can still be triggered using the recursive keyword).
2018-02-13 02:18:28 -08:00
alalazo
c62b3eef55 filter_compiler_path: added the possibility to narrow search path
Following a comment from Todd, the search path for the files listed in
`filter_compiler_wrappers` can now be narrowed. Anyhow, the function
implementation still makes use of `find`, the rationale being that we
have already seen packages that install artifacts in e.g. architecture
dependent folders. The possibility to have a relative search path might
be a good compromise between the previous approach and the one suggested
in the review.

Also: 'ignore_absent' and 'backup' keyword arguments can be optionally
forwarded to `filter_file`.
2018-02-13 02:18:28 -08:00
alalazo
4e48bae096 mixins: moved debug logs to 'filter_file'. Renamed shadowed variable name.
Following comments from Todd:

- the call to tty.debug has been moved deeper, to log the filtering of each file
- the shadowing on the name "kwargs" is avoided
2018-02-13 02:18:28 -08:00
alalazo
eae7263838 mixins: flush method dictionaries after registration. 2018-02-13 02:18:28 -08:00
alalazo
22def01adf mixins: implemented declarative syntax
Implemented a declarative syntax for the additional behavior that can
get attached to classes. Implemented a function to filter compiler
wrappers that uses the mechanism above.
2018-02-13 02:18:28 -08:00
alalazo
8e0f9038ab Improved naming of properties and classes (per Denis comments). 2018-02-13 02:18:28 -08:00
alalazo
28e129b087 Added mixins to modularize common behaviors across build-systems.
Modifications:
  * added a mixin to filter compiler wrappers from files
  * modified hdf5, openmpi, mpich, mvapich2 to use it
2018-02-13 02:18:28 -08:00
Todd Gamblin
b98cdf098a Rework command reference in docs, add spack commands command
- command reference now includes usage for all Spack commands as output
  by `spack help`.  Each command usage links to any related section in
  the docs.

- added `spack commands` command which can list command names,
  subcommands, and generate RST docs for commands.

- added `llnl.util.argparsewriter`, which analyzes an argparse parser and
  calls hooks for description, usage, options, and subcommands
2018-02-12 20:25:17 -08:00
Todd Gamblin
1b998cbeee Fix issues with spack [cmd] -h help output
- Shorten Spack command usage for short options. Short options are now
  shown as [-abc] instead of as [-a] [-b] [-c]

- fix bug that mixed long and short options for top-level `spack help`
2018-02-12 20:25:17 -08:00
Todd Gamblin
fff3cc695d Fix section labels for some commands in the docs 2018-02-12 20:25:17 -08:00
Todd Gamblin
39e6d54956 make defaults in command help look like standard argparse 2018-02-12 20:25:17 -08:00
Todd Gamblin
8f52de32b6 Add help for buildcache, reorganize command help categories
- Add proper help for `spack buildcache` subcommands

- Reorganize the help categories of Spack commands so that buildcache is
  in packaging and diy and setup are now in build.
2018-02-12 20:25:17 -08:00
Todd Gamblin
2b7dfcd19f Clean up help metavar for --scope configuration options
- previously commands with this argument showed a long list of choices
  that were platform specific.

- use a better metavar: {defaults,system,site,user}[/PLATFORM]
2018-02-12 20:25:17 -08:00
becker33
8913c3465c
Change location of public key in basic tutorial (#7192)
* Change location of public key in basic tutorial

* Change tuturial version number to 11.2
2018-02-07 08:45:29 -08:00
healther
e3951c2a21 Fix ignore-conflicts for extensions in views (#7167)
Fixes #7159

When activating extensions in external views, the --ignore-conflicts
option was being ignored. In this particular issue the conflict was
for the duplicate __init__ file for multiple python packages in the
same namespace, but in general any conflict for extensions would
cause an error whether or not --ignore-conflicts was set.

This also renames the 'force' option of do_activate to
'with_dependencies' and updates views to call do_activate with this
set to False (since it traverses the dependency dag anyway). This
isn't strictly required, it just avoids redundant calls.
2018-02-02 14:45:21 -08:00
scheibelp
71483d9390
Update tutorial on advanced packaging (#7144)
This reorganizes most sections and rewords a significant portion of
the content (including all introductions) but keeps all the examples.

* Remove section 'What happens at subscript time' from tutorial:
  it is too detailed for a tutorial
* Move the 'Extra query parameters' and 'Attach attributes to other
  packages' sections into a separate grouping 'Other packaging topics'
* move the 'Set variables at build time yourself' section after
  'Set environment variables in dependents' section since the latter
  is more motivating
* start the 'set environment variables at build-time for yourself'
  section with qt as an example
* renamed section 'specs build interface' to 'retrieving library
  information' and updated section introduction
* renamed section 'a motivating example' to 'accessing library
  dependencies'; split out the material which deals with implementing
  .libs for netlib-lapack into a separate section called 'providing
  libraries to dependents'. consolidated in material from the section
  'single package providing multiple virtual specs' since
  netlib-lapack is an example of this (this removes the material
  about intel-parallel studio)
2018-02-01 12:10:25 -08:00
Todd Gamblin
df758e1cfc Improve log parsing performance (#7093)
* Allow dashes in command names and fix command name handling

- Command should allow dashes in their names like the reest of spack,
  e.g. `spack log-parse`
  - It might be too late for `spack build-cache` (since it is already
    called `spack buildcache`), but we should try a bit to avoid
    inconsistencies in naming conventions

- The code was inconsistent about where commands should be called by
  their python module name (e.g. `log_parse`) and where the actual
  command name should be used (e.g. `log-parse`).

- This made it hard to make a command with a dash in the name, and it
  made `SpackCommand` fail to recognize commands with dashes.

- The code now uses the user-facing name with dashes for function
  parameters, then converts that the module name when needed.

* Improve performance of log parsing

- A number of regular expressions from ctest_log_parser have really poor
  performance, most due to untethered expressions with * or + (i.e., they
  don't start with ^, so the repetition has to be checked for every
  position in the string with Python's backtracking regex implementation)

- I can't verify that CTest's regexes work with an added ^, so I don't
  really want to touch them.  I tried adding this and found that it
  caused some tests to break.

- Instead of using only "efficient" regular expressions, Added a
  prefilter() class that allows the parser to quickly check a
  precondition before evaluating any of the expensive regexes.

- Preconditions do things like check whether the string contains "error"
  or "warning" (linear time things) before evaluating regexes that would
  require them.  It's sad that Python doesn't use Thompson string
  matching (see https://swtch.com/~rsc/regexp/regexp1.html)

- Even with Python's slow implementation, this makes the parser ~200x
  faster on the input we tried it on.

* Add `spack log-parse` command and improve the display of parsed logs

- Add better coloring and line wrapping to the log parse output.  This
  makes nasty build output look better with the line numbers.

- `spack log-parse` allows the log parsing logic used at the end of
  builds to be executed on arbitrary files, which is handy even outside
  of spack.

- Also provides a profile option -- we can profile arbitrary files and
  show which regular expressions in the magic CTest parser take the most
  time.

* Parallelize log parsing

- Log parsing now uses multiple threads for long logs
- Lines from logs are divided into chnks and farmed out to <ncpus>
- Add -j option to `spack log-parse`
2018-01-31 21:57:56 -08:00
Massimiliano Culpo
7368586f0d Mark slow unit tests (#6994)
* Marking database tests as slow

* Marking url command tests as slow

* Marking every test that uses database as slow

* Marking tests that import files as slow

* Marking gpg tests as slow

* Marking all versions and one list tests as slow

* Added more markers to unit tests + cli option to skip slow tests

Following a discussion with Axel, the generic 'slowtest' marker has been
split into 'db', 'network' and 'maybeslow'. A brief description of the
meaning of each marker has been added to pytest.ini.

A command line option to run only fast tests has been added to
'spack test'

* Don't use classes to group tests together

Reverted grouping tests under a class, as required in the review

* Minor style changes
2018-01-29 06:19:50 -08:00
scheibelp
f27c5e74ed Remove Package instance caching in Repo (#6367)
This attempts to address one of the complaints at #5996 (comment):

> Repo currently caches package instances by Spec, and those Package instances have a Spec. 
> This is unnecessary and causes confusion. I think I thought that we'd need to cache instances 
> after loading package classes, but really just caching the classes is fine.

With this update, Repo's package cache is removed and Specs cache the package reference themselves. One consequence is that Specs which compare as equal will store separate instances of a Package class (not doing this creates issues for #4595 (comment)).

There were several references to Spec.package that could be replaced with Spec.package_class without any additional modifications. There are still a couple remaining references to Spec.package in Spec that would require adding functionality before replacing (e.g. calling Package.provides and Package.installed).

Note this makes it difficult to mock fetchers for tests which invokes code that reconstructs specs. test_packaging was one example of this where the updates caused a failure (in that case the error was avoided by not making an unnecessary call).

Details:
* Replace instances of spec.package with spec.package_class where a class method is being called
* Remove instances of Repo.get where Spec.package_class can be used in its place
* remove Repo.get caching instances of Package class for specs
* remove redundant check (which is also incorrect now that each spec stores its own copy of its package)
* avoid creating mirror with specs because it copies specs and those copies dont refer to the mocked fetcher (and it is also not required for the test)
* remove checks that are no longer necessary since repo doesn't cache specs
2018-01-28 16:58:08 -08:00
Adam J. Stewart
f7f4bae154 Fix gfortran 7 detection (#7017) 2018-01-28 16:29:48 -08:00
Massimiliano Culpo
5af9256d4f Cleaned up JUnit report generation on install (#6977)
* Cleaned up JUnit report generation on install

The generation of a JUnit report was previously part of the install
command. This commit factors the logic into its own module, and uses
a template for the generation of the report.

It also improves report generation, that now can deal with multiple
specs installed at once. Finally, extending the list of supported
formats is much easier than before, as it entails just writing a
new template.

* Polished report generation + added tests for failures and errors

The generation of a JUnit report has been polished, so that the
stacktrace is correctly displayed with Jenkins JUnit plugin. Standard
error is still not used.

Added unit tests to cover for installation failures and installation
errors.
2018-01-28 12:07:59 -08:00
Federico Ficarelli
1f39afe475 Enable install of multiple specs from yaml files (#6984) 2018-01-26 08:33:53 +01:00
Axel Huebl
85c887a939 Python Installs: No User Site Dir (#7065)
Avoid adding an "outside" (local home's) python user site directory
during python package installs.

Implements #6611

Fixes packages with auto-find side effects such as `py-setuptools`
that cause `py-matplotlib` to fail to build #6558
2018-01-25 17:50:50 +01:00
Alastair Harrison
eb0f5c6efe Fix error message typo in 'spack create' cmd (#7042)
- Previously would print the spec's namespace twice, rather
  than printing the spec's namespace, followed by the repo's namespace.
2018-01-23 14:00:18 -06:00
Levi Baber
8d2e340e16 Add --full-path option to module find (#6838) 2018-01-19 20:08:36 +01:00
Massimiliano Culpo
a389bff949
Added a setter to the Spec.prefix property (#6814)
This commit removes logic from Spec that was there only to be used in
tests, and allows to set a new prefix cleanly in user's code.
2018-01-19 09:31:19 +01:00
becker33
3686c250ed Fix type issues with setting flag handlers (#6960)
The flag_handlers method was being set as a bound method, but when
reset in the package.py file it was being set as an unbound method
(all python2 issues). This gets the underlying function information,
which is the same in either case.

The bug was uncovered for parmetis in #6858. This is a partial fix.
Included are changes to the parmetis package.py file to make use of
flag_handlers.
2018-01-18 17:55:44 -08:00
Todd Gamblin
84b2cc0823
Final changes for v0.11.0 (#6318) 2018-01-16 22:25:08 -08:00
Massimiliano Culpo
4d7e7f25c4 Fix installing specs from yaml file (#6906)
The feature added in #4611 is currently broken. This commit fixes the
behavior of the command and adds unit tests to ensure the basic semantic
is maintained.

It also changes slightly the behavior of Spec.concretized to avoid
copying caches before the concretization (as this may result in a
wrong hash computation for the DAG).
2018-01-16 08:03:10 -06:00
Todd Gamblin
50ca4979e1
Speed up doc builds with spack list --format=html (#6945)
- Generating the HTML from for >2300 packages from RST in Sphinx seems to
  take forever.

- Add an option to `spack list` to generate straight HTML instead.

- This reduces the doc build time to about a minute (from 5 minutes on a mac laptop).
2018-01-16 00:12:11 -08:00
Massimiliano Culpo
1fb38c9e04
Vendor ordereddict for python2.6 only (#6931)
* Vendor ordereddict for python2.6 only

This commit substitutes the custom module 'ordereddict_backport' with
the more known 'ordereddict' and vendors it only for python 2.6. Other
supported versions of python will use 'collections.OrderedDict'.

* Use absolute imports also for python 2.6

See PEP-328 for more information on the subject

* Added provenance of vendored ordereddict
2018-01-16 07:00:39 +01:00
scheibelp
278901c02c
Handle test dependencies that are python extensions (#6904)
See #6794

This fixes cases where test-only dependencies were omitted from
consideration when modifying the environment at build time. This
includes an update to the python package definition to add
testing-related python extensions to its specialized environment
setup.
2018-01-12 19:02:54 -08:00
scheibelp
f4101550d1
Relax conflict checks for externals (#6907)
This updates the conflict-checking logic to require that the conflict
spec matches exactly and that all fields mentioned in the conflict
spec are present in the concretized spec in order to report a
conflict. This will automatically skip all conflict checks for
dependencies of externals (since externals strip dependencies). This
will not affect non-external packages since all fields and
dependencies are fully specified for such packages.
2018-01-12 10:53:11 -08:00
Adam J. Stewart
d7920ab4f3
Keep track of source and versions for external libraries (#6803)
* Keep track of source and versions for external libraries

* Note source of more obscure libraries

* We aren't upgrading jsonschema after all

* Add note on modifications made to pytest
2018-01-10 19:14:19 -06:00
Adam J. Stewart
57c71aea89
Update to pytest 3.2.5 (#6801)
* Update to pytest 3.2.5

* Get pytest to pass Python 2.6 compatibility checks
2018-01-10 17:41:50 -06:00
Adam J. Stewart
10ee7d6d81
Add suggestion to Contribution Guide to activate flake8 (#6886) 2018-01-10 13:02:33 -06:00
Adam J. Stewart
d17a10c6ac
Update to the latest version of jinja2 (#6790) 2018-01-10 10:06:04 -06:00
Adam J. Stewart
4fdf08e51c
Update to py 1.4.34 (#6789)
* Update to the latest version of py

* Revert back to py 1.4.34
2018-01-10 10:05:39 -06:00
Adam J. Stewart
e4c0ed8540
Add unit tests for spack versions command (#6774)
* Add unit tests for spack versions command

* Fix bug in web spidering for Python 2.6
2018-01-10 10:04:47 -06:00
Adam J. Stewart
2f0dd02c10
Update to the latest version of six (#6787) 2018-01-10 10:04:07 -06:00
Adam J. Stewart
cab34d7d3b
Fix bug in placeholder spack cd command and add unit tests (#6776) 2018-01-10 10:03:45 -06:00
Adam J. Stewart
ba84630caf Add unit tests for spack arch command (#6775) 2018-01-10 13:53:55 +01:00
Adam J. Stewart
f7bf73a458 Add unit tests for spack graph command (#6778) 2018-01-10 13:52:34 +01:00
Adam J. Stewart
824e078140 Fix a typo in fetch_strategy error message formatting (#6878) 2018-01-10 13:49:16 +01:00
Adam J. Stewart
ffd435bad7 Add documentation on Codecov (#6842) 2018-01-07 08:28:56 -08:00
Massimiliano Culpo
d978cfbb1a Fixes the bug in spack configure spotted in #6833 (#6837) 2018-01-05 15:07:51 -06:00
Adam J. Stewart
d1aee2c2f2
Fix spack configure output (#6835) 2018-01-05 14:26:43 -06:00
Michael Kuhn
01bec7976b Fix HTML detection (#6394)
Some servers report a content-type header instead of Content-Type.
2018-01-02 21:21:36 -06:00
Denis Davydov
4b5fe75bc3 add OctavePackage (#6746)
* add OctavePackage

1. remove import CudaPackage which is not needed anymore
2. mention CudaPackage and OctavePackage in packaging guide
3. adjust OctavePackageTemplate
4. add clue file for Octave build
5. sanity check on self.prefix

* use setup_environment
2018-01-02 20:03:27 -06:00
Adam J. Stewart
464ca87879 Add more unit tests for spack clean command (#6777) 2018-01-02 11:31:38 -08:00
Adam J. Stewart
05ce8407af Add unit tests for spack help command (#6779)
* Add unit tests for spack help command
* Work around issue with using `spack help` twice in tests
2017-12-30 22:55:49 -08:00
Adam J. Stewart
088c193a78 Update to the latest version of argparse (#6786)
* Update to the latest version of argparse

* Re-add colified logic
2017-12-30 16:08:35 -08:00
Adam J. Stewart
010334bf22 Update to distro 1.0.4 (#6788)
* Update to the latest version of distro

* Update distro to 1.0.4
2017-12-30 15:44:19 -08:00
Adam J. Stewart
0c1f4a7997 Add more unit tests for spack list command (#6750) 2017-12-22 10:29:20 -08:00
Massimiliano Culpo
d3913709bb spack mirror remove: fix no-update error (#6559)
Fixes #4573 

"spack mirror remove" was not actually removing mirrors from the
configuration.
2017-12-22 10:28:23 -08:00
Adam J. Stewart
1ce0c1b556 Fix python3 compatibility bug in spack edit command (#6748)
In Python 2, filter() returns a list, but in Python 3, filter()
returns an iterator, and iterators have no length.
2017-12-21 17:45:15 -08:00
becker33
feb4f1b387
separate stdout and stderr for module loading (#6713) 2017-12-21 16:27:52 -08:00
Patrick Gartung
e5d6f28b4e binary caching: handle files misidentified as needing relocation (#6679)
* Only specify a file as needing relocation if it contains the spack
  root as a text string (this constraint also applies to binaries)
* Don't fail if there is an error retrieving RPATH information from a
  binary (even if it is specified as requiring relocation)
2017-12-20 18:21:41 -08:00
becker33
28d8784ab9 Compiler flag handlers (#6415)
This adds the ability for packages to apply compiler flags in one of
three ways: by injecting them into the compiler wrapper calls (the
default in this PR and previously the only automated choice);
exporting environment variable definitions for variables with
corresponding names (e.g. CPPFLAGS=...); providing them as arguments
to the build system (e.g. configure).

When applying compiler flags using build system arguments, a package
must implement the 'flags_to_build_system_args" function. This is
provided for CMake and autotools packages, so for packages which
subclass those build systems, they need only update their flag
handler method specify which compiler flags should be specified as
arguments to the build system.

Convenience methods are provided to specify that all flags be applied
in one of the 3 available ways, so a custom implementation is only
required if more than one method of applying compiler flags is
needed.

This also removes redundant build system definitions from tutorial
examples
2017-12-20 15:40:38 -08:00
Denis Davydov
548c225d45 dealii: add GMSH, add CMAKE_FIND_APPBUNDLE to CMakePackage (#6723)
* dealii: add GMSH dependency

* CMakePackage: add CMAKE_FIND_APPBUNDLE to prevent picking up binaries from /Applications
2017-12-19 08:28:55 +01:00
Massimiliano Culpo
0192455885 spack install: make restaging the default (#6465)
Fixes #5940

This PR changes the option '--restage' of 'spack install' to
'--dont-restage', inverting its meaning and the default behavior
of the command.
2017-12-18 18:50:02 -08:00
scheibelp
020ce7735d
Skip collection of compilers which report an empty version (#6684)
Fixes #6200

For compilers that successfully run a version detection script but
don't actually return a version, Spack was keeping track of the
empty version and then failing when attempting to construct a
compiler spec. This skips any attempt to add a compiler entry when
no version is reported (but logs when a compiler fails to report
a version).
2017-12-14 17:54:57 -08:00
Mark Olesen
5727054c4a misc fixes, changed to EnvironmentModifications (issue #6501) (#6541)
* Support pruning of vars with Env from_sourcing_file (issue #6501)

- Blacklist string literals or regular expressions of environment
  variables that are to be removed from consideration as being affect
  by the sourcing of the file. Conversely, whitelist modifications
  that should not ignored.  Whitelisted variables have priority over
  blacklisting.
  Eg,

      EnvironmentModifications.from_sourcing_file
      (
          bashrc
          blacklist=['JUNK_ENV', 'OPTIONAL_.*'],
          whitelist=['OPTIONAL_REQUIRED.*']
      )

This modification can be used to eliminate environment variables that
are not generalized for modules (eg, user-specific variables).

* BUG: module prepend-path in wrong order (fixes #6501)

* STYLE: module variables in sorted order (issue #6501)

- looks nicer and also helps when comparing the contents of different
  module files.

* ENH: remove duplicates from env paths when creating modules (issue #6501)

- this makes for a cleaner module environment and helps avoid some
  unnecessary changes to the environment that are only provoked by
  redundancies in the PATH.

  eg,
      before PATH=/usr/bin
      after  PATH=/usr/bin:/usr/bin:/my/application/bin

  should only result in /my/application/bin being added to the PATH
  and not /usr/bin:/my/application/bin

Activate via the 'clean' flag (default: False):

    EnvironmentModifications.from_sourcing_file(bashrc, clean=True,..
2017-12-14 21:24:06 +01:00
becker33
9d8ea00966
add -d option for edit command (#6416)
* add -d option for edit command and improve suffix extrapolation from '.py' to use glob
2017-12-11 16:17:53 -08:00
Massimiliano Culpo
bd5d6b2bfa Simplified "Environment-Modules" section in getting started guide. (#6410)
Fixes #2440

The "Getting started" guide should be short and sweet. This commit
simplifies the "Environment-Modules" section pruning:

 - outdated / wrong suggestions as noted in #2440
 - uncommon setups that are better treated in a reference guide
2017-12-11 11:34:39 -08:00
Massimiliano Culpo
05b10ce967
config.py: fixed comments that refer to variables following them (#6585)
According to the documentation here:

  http://www.sphinx-doc.org/en/stable/ext/autodoc.html

"For module data members and class attributes, documentation can either
be put into a comment with special formatting (using a #: to start the
comment instead of just #), or in a docstring after the definition."
2017-12-07 08:09:53 +01:00
Sergey Kosukhin
bcb1630e39 CMAKE_INSTALL_RPATH is semicolon-separated. (#6577) 2017-12-06 08:07:11 +01:00
Patrick Gartung
f6c99d7beb Buildcache: relocate fixes (#6512)
* Updated function which checks if a binary file needs relocation.
  Previously this was incorrectly identifying ELF binaries as symbolic
  links (so they were being excluded from relocation). Added test to
  check that ELF binaries are not considered symlinks.

* relocate_text was not replacing paths in text files. Added test to
  check that text files are relocated properly (i.e. paths in the file
  are converted to the new prefix).

* Exclude backup files created by filter_file when installing from
  binary cache.

* Update write_buildinfo_file method signature to distinguish between
  the spec prefix and the working directory for the binary cache
  package.
2017-12-01 11:15:16 -08:00
Adam J. Stewart
0ffd7f8918 Remove reference to deprecated spack md5 command (#6537) 2017-12-01 14:31:40 +01:00
Massimiliano Culpo
23b1108451 gpg creation: added suggestion on how to set-up rngd (#6483) 2017-11-30 10:51:55 -08:00
Massimiliano Culpo
f7c0e24f0a 'spack install': make conflict messages as verbose as 'spack spec' (#6436)
"spack spec" was providing helpful error information about conflicts
that was missing from "spack install", this updates "spack install"
to provide the same information.
2017-11-30 10:41:24 -08:00
David Lukes
27b929bfe2 Improve docstring of spack.directives.extend (#6485)
The original docstring had confusing wording re: what is going to
symlinked and where when using the `extend` directive, and how exactly
the symlinking is performed (not automatically on install, but using
`spack activate`). See #5559.
2017-11-29 14:30:42 -08:00
Adam J. Stewart
e01a16b992 Remove spack md5 and sha256 commands (#6428) 2017-11-28 13:41:46 -08:00
healther
dc8f587b61 add path to package.py in case of a syntax error (#6458) 2017-11-28 13:32:21 -08:00
Massimiliano Culpo
f6ead27b5b spack spec: don't show normalize + no hash for non concrete specs (#6417)
Showing "Normalize" on output doesn't give users additional information,
as this step is essentially an implementation detail of concretization.
This PR skips it and shows just the input spec and the concretized one.

Printing partial hashes for input spec has been disabled.
2017-11-28 09:03:32 -08:00
Adam J. Stewart
257d968259 Use long flag in spack help message (#6429) 2017-11-26 06:14:47 -07:00
Michael Kuhn
5bbbfe9446 Introduce virtual dependency pkgconfig (#5198)
There are two providers, pkgconf and pkg-config, with the former being
the default provider.
2017-11-23 08:05:38 -07:00
Adam J. Stewart
1b3b262776 Remove spack extensions from list of known issues (#6405) 2017-11-22 02:31:56 +01:00
Denis Davydov
34da07db9b dealii: add cuda_arch variant via CudaPackage (#6070) 2017-11-19 12:39:13 -07:00
Christoph Junghans
7da8a02cbf
git grep --files-with-matches github.com/llnl/spack | xargs sed -i '/github.com/s@llnl/spack@spack/spack@' (#6329) 2017-11-15 16:46:39 -07:00
scheibelp
b9be9519e8
Fix truncated error messages in directives (#6320)
Fixes #6299

Error messages in 'directives' were split across multiple lines and not
properly concatenated, which led to truncated messages.
2017-11-15 10:33:59 -08:00
Todd Gamblin
9c93c4a42b
Update tutorial slide links. (#6276) 2017-11-13 07:52:43 -07:00
becker33
9b80f2fd38 basics tutorial: output updated (#6267)
* basics tutorial: output updated through gcc

* finished update for basics tutorial

* missed two lines

* doc error fix
2017-11-13 00:12:23 -07:00
Todd Gamblin
24d636eb30
Updates to build systems tutorial (#6273)
* Get rid of period in command

* formatting

* fix header

* Change GNU Make to Make

* Add variants
2017-11-13 00:11:55 -07:00
Mario Melara
2f1cbb5caa Add build systems tutorial for SC17 (#6125)
* First draft for SC17 build systems portion

Added tutorial_buildsystems.rst file as well as example files under
the tutorial/ directory.

* Remove floating `

* Add requested changes, and examples of subclasses

Added in the requested changes to the documentation. Also added in
information about the subclasses and the defaults that they provide.
Also fixed some phrasing issues, formatting and punctuation.

* Flake8 fixes and new files for classes

Made flake8 fixes to pass tests and also added files to demonstrate code
in the classes.

* Minor edits

Edits in formatting and made some sentence changes

* Flake8 fixes

More flake8 fixes

* Flake8 fix

* Change section order on tutorial and minor edits

Placed the section at the appropriate section for the tutorial and then
added some minor edits that were requested.

* Add requested changes and more details

Added more details to Cmake, Makefile and Python Packages.

* Fixed formatting and minor edits

* Fix doc build error
2017-11-12 23:24:18 -07:00
Adam J. Stewart
9db7eaade8 Last minute edits to the Configuration Tutorial (#6271) 2017-11-12 23:14:44 -07:00
becker33
b77acd0896 Add configuration tutorial for SC17 (#6141) 2017-11-12 20:12:57 -07:00
Matthew LeGendre
265c30b943 Update packaging tutorial (#6270)
* Allow types and 'any' in variant definitions.

- Previously variant values had to be a tuple or a callable predicate.

- This allows 'any' as shorthand for `lambda x: True` and type objects
  as shorthand for "any value of this type".

- Makes variant definitions more readable, keeps lambdas out of
  packages for common cases.

* Update packaging tutorial

* Fix bad file reference in packaging tutorial
2017-11-12 20:09:12 -07:00
becker33
b09341d861 binary packages: do post install hooks (#6269) 2017-11-12 17:57:10 -07:00
Massimiliano Culpo
1ab703448d SC17: advanced packaging tutorial (#6148)
* First draft of the advanced packaging tutorial

* advanced packaging tutorial: improved phrasing

Thanks Denis and Hartzell!

* Fixed typos + reworded a couple of sentences
2017-11-12 00:27:57 -08:00
Massimiliano Culpo
fe889124eb SC17: reworked module file tutorial section (#5657)
* Reworked module file tutorial section

First draft for the SC17 update. This includes:

 - adding an introduction on module files + Spack's module
   generation blueprints
 - adding a set-up section and provide a docker image for easy set-up
 - updating all the relevant snippets
 - extending a bit some of the concepts that were already touched

* Added reference to #5582 + committed Dockerfiles

Also fixed a couple of typos spotted by Denis.

* module file tutorial: added section on template customization

* module file tutorial: fixed minor typos + rephrased a sentence

* module file tutorial: made explicit that Docker image comes with software

* module file tutorial: improved phrasing and layout.

Thanks Hartzell!

* module file tutorial: added vim and nano to editors

* module file tutorial: fixed typo

* Fixed typos

Thanks Adam!

* module file tutorial: updated Dockerfile + minor changes in introduction
2017-11-12 00:27:20 -08:00
becker33
1008975bc0 Don't include build-only dependencies in build cache hash (#6262) 2017-11-11 20:54:17 -08:00
scheibelp
8c458a856f
Group flags and values separated by space (#6169)
Fixes #6154

For compiler options which set values using the syntax "-flag value"
(with a space between the flag and the flag's value) the flag and
value were treated as separate and reordered. This updates Spack's
logic to treat the flag and value as a single unit, even if there is
a space between them. It assumes that all flags are prefixed with
"-" and that all flag values are not.
2017-11-10 16:33:50 -08:00
Patrick Gartung
124b5fc296 deal with case where symbolic links are copied (#6178)
* deal with case where symbolic links are copied

* Suggested changes
2017-11-09 14:38:12 -08:00
Patrick Gartung
1484a94b1e spack buildcache: symlink and relative RPATH fixes (#6140)
* Skip rewriting files that are links (this also avoids issues with parsing
  the output of the 'file' command for symlinks)
* Fail rather than warn for several gpg signing issues (e.g. if there is no
  key available to sign with)
* Installation with 'buildcache install' only retrieves link and run
  dependencies (this matches 'buildcache create' which only creates tarballs
  of link/run dependencies)
* Don't rewrite RPATHs for a binary if the binary cached package was created
  with relative RPATHs
* Refactor relocate_binary to operate on multiple binaries (given as a
  collection of paths). This was likewise done for relocate_text and
  make_binary_relative
2017-11-09 10:53:34 -08:00
Todd Gamblin
3a0324fe1a
add artisanal handcrafted SVG Spack logo. (#6165)
- This isn't one of those autogenerated SVGs from a drawing program!

- This is a completely re-traced, minimalist SVG file with clearly
  delineated pieces so that your favorite renderer can draw a Spack logo
  at whatever resolution you want.

- Included versions with text, as well.
2017-11-06 22:42:16 -08:00
Johann Klähn
ac3a807f58 Fix spack view hardlink (#6130)
Fix a typo in "spack view hardlink" introduced in #5415
("os.hardlink" does not exist).
2017-11-06 19:19:27 -08:00
Michael Kuhn
ca73103dac Introduce static_to_shared_library function (#6092)
The static_to_shared_library function takes an existing static library
and produces a shared library based on it.
2017-11-06 17:21:46 -07:00
Axel Huebl
54bb28ccb0 Docs: MPI as Root (#6156)
New versions of OpenMPI need `--allow-run-as-root` for
running as root:
  http://www.open-mpi.de/doc/v2.0/man1/mpirun.1.php#toc22
2017-11-06 13:03:46 -08:00
scheibelp
31c5467f56
Add back help placeholder for "spack load" (#6127)
Fixes #6126

#3183 removed the print_help function from the "modules" module.
This adds it back so that if a user invokes 'spack load foo' without
having sourced an environment setup script, they will be prompted
to do so. This also improves the placeholder message to tell the 
user to invoke 'spack' as shell function rather than as an executable.
2017-11-06 11:03:36 -08:00
Todd Gamblin
05fa302655
Replace github.com/llnl/spack with github.com/spack/spack (#6142)
We moved to a new GitHub org! Now make the code and docs reflect that.
2017-11-04 17:08:04 -07:00
Johann Klähn
3fc8a71afb Fix restaging of resources (#5681)
Part of the resource staging process is to place downloaded/expanded
files in the root stage. This was not happening when a resource stage
was restaged.
2017-11-03 11:29:43 -07:00
Todd Gamblin
12f0725e9f spack fetch: don't fetch externals. (#6124)
Fixes #6123

spack fetch shouldn't attempt to fetch external deps when invoked
with --dependencies.
2017-11-03 10:15:15 -07:00
Michael Kuhn
bd7d61325f Configure user for mock Git repository (#6128)
If user.useConfigOnly is set globally and no name or e-mail is
configured, the git_fetch tests fail.
2017-11-02 21:43:28 -07:00
Ben Boeckel
0f896e921f test_activations: also test perl activations 2017-11-02 18:45:40 -07:00
Peter Scheibel
3a2a0c9ad4 test_activations: test Python's extension logic 2017-11-02 18:45:40 -07:00
Peter Scheibel
dde93c01cf spec: support a test prefix
This is used in tests to test real packages without actually building
and installing them.
2017-11-02 18:45:40 -07:00
Ben Boeckel
d5a3d9d20e view: test conflicting packages in views 2017-11-02 18:45:40 -07:00
Ben Boeckel
13b669de8e view: test that extension paths exist 2017-11-02 18:45:40 -07:00
Ben Boeckel
a06c6b0366 filesystem_view: reject packages with activations
If there are extensions that are globally activated, reject adding them
to a view. Those extensions should not be implicitly activated.
2017-11-02 18:45:40 -07:00
Ben Boeckel
26724688b1 view: test viewing external packages 2017-11-02 18:45:40 -07:00
Ben Boeckel
ea62347c46 view: add a test for extension activation 2017-11-02 18:45:40 -07:00
Ben Boeckel
4511d9d924 extensions: support only showing a subset of information 2017-11-02 18:45:40 -07:00
Ben Boeckel
b7ec870c3b extensions: support acting on a view
This allows extensions to be (de)activated and queried within a view
rather than only acting on the global installation.
2017-11-02 18:45:40 -07:00
Oliver Breitwieser
db529f5b61 view: use the FilesystemView abstraction for creating views 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
af42c24ef5 view: fix some docstrings for arguments 2017-11-02 18:45:40 -07:00
Ben Boeckel
9a39efd966 filesystem_view: do not link external packages 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
538d855e1b filesystem_view: add a class to handle a view via a Yaml description 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
21dc31a4a1 package: support removing dependencies when deactivating 2017-11-02 18:45:40 -07:00
Ben Boeckel
f50ddeed9f conftest: mock out spack.store.extensions as well 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
078f85a125 views: support querying view layouts as well
This abstracts out the layout in use between the global installations
and a specific view.
2017-11-02 18:45:40 -07:00
Oliver Breitwieser
00a893aa79 link_tree: support choosing the link function
This can be used to make hardlinks rather than symlinks.
2017-11-02 18:45:40 -07:00
Oliver Breitwieser
9024ddcf05 link_tree: support ignoring conflicts 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
20cd82dc56 directory_layout: add a YamlExtensionsLayout class
This uses a view to query extensions.
2017-11-02 18:45:40 -07:00
Oliver Breitwieser
94c0740a88 link_tree: only remove matching files when unmerging 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
b9e8402104 directory_layout: factor out an ExtensionsLayout class 2017-11-02 18:45:40 -07:00
Ben Boeckel
650ca7db9e extensions: add an installed_extensions_for method 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
56bafdc282 database: rename installed_extensions_for
Views support activating packages, so rename the method because it will
soon query what is activated versus what is installed.
2017-11-02 18:45:40 -07:00
Oliver Breitwieser
70d3558596 package: support verbosity when activating 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
af0cf2d3c6 package: rename activated to is_activated
This allows the activation code to be later given parameters.
2017-11-02 18:45:40 -07:00
Ben Boeckel
f31b47c353 cmd/test: fix a typo in a comment 2017-11-02 18:45:40 -07:00
Ben Boeckel
6f9bf197a5 spec_yaml: fix a typo 2017-11-02 18:45:40 -07:00
Oliver Breitwieser
28cc077ef6 view: fix a typo 2017-11-02 18:45:40 -07:00
Ben Boeckel
76305038ef determine full compiler version for gcc-7
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-02 18:44:10 -07:00
Todd Gamblin
c96f2e50a6
Only use XCode clang wrappers for packages that set use_xcode=True (#6077) 2017-11-02 09:19:23 -07:00
scheibelp
3eb59f6932
update filename used for cc wrapper invocation debug log (#5837)
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-01 20:11:00 -07:00
scheibelp
60a485591c Fix user specs which include already-installed packages (#5939)
* 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-11-01 18:44:31 -07:00
scheibelp
e5b8312de3 Auto install available pre-built packages from binary cache (#5242)
* 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-30 14:16:46 -07:00
Sergey Kosukhin
5ebddcd5e3 Bugfix: from_list_url(). (#5780)
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-27 17:41:41 -07:00
Ben Boeckel
bd6378a6d2 Package.extends: update semantics when package isn't concrete (#5600)
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-26 13:12:32 -07:00
Patrick Gartung
8e47b17a4d Buildcache: symlinks, externals, & install-checking (#5894)
* 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-26 11:06:59 -07:00
Ondřej Čertík
aa750f12de Colorize "Installing pkg_name" (#5950)
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-26 00:06:56 +02:00
scheibelp
dcdd16b35e Check for namespace-qualified packages in repo_for_pkg (#5787)
* 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-25 21:08:03 +02:00
George Hartzell
b43064190c Specify base branch for flake8 comparison (#5796)
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-25 14:30:22 +02:00
Massimiliano Culpo
8b7d2d0f24 'spack install' can overwrite an existing installation (#5384)
'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-24 12:32:30 -07:00
Todd Gamblin
3f68cc2ba7 Fix bug in spack flake8 when no files differ from develop (#5898) 2017-10-24 11:29:18 +02:00
Todd Gamblin
6b5ca38723 do not use 'l' as a variable name, to appease new flake8 version
- 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-24 10:05:36 +02:00
Todd Gamblin
5449884b2e Fix bare 'except:' to placate errors in new flake8 version.
- fixes E722 errors from latest version of flake8
- requires us to not use 'bare except:' and catch BaseException instead
2017-10-24 10:05:36 +02:00
Todd Gamblin
b98fc48273 log tests use tmpdir properly 2017-10-24 10:05:36 +02:00
Todd Gamblin
0bb1eb32f2 fix bugs found with stricter flake8 rules
- 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-24 10:05:36 +02:00
Todd Gamblin
7dd79094b0 remove wildcards from make spack core and packages
- This removes all wildcard imports EXCEPT `from spack import *` in packages
2017-10-24 10:05:36 +02:00
Todd Gamblin
7757ebc0bc flake8: no wildcards in core; only import * from spack in packages
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-24 10:05:36 +02:00
Todd Gamblin
78e22940c2 add --all option to spack flake8
- `-a`/`--all` causes flake8 to run on all files rather than just
  different ones.
2017-10-24 10:05:36 +02:00
scheibelp
e660611a87 package: remove bare except statements (#5896) 2017-10-23 19:28:53 -07:00
Massimiliano Culpo
3e7680e24a getting_started.rst: removed tip suggesting the use of 2 Spack instances (#4061) 2017-10-20 21:09:08 -07:00
Massimiliano Culpo
3afc6770f0 module-type argument defaults to 'tcl' instead of every known type (#5751)
fixes #5721

This is to solve the fact that lmod needs to be configured
by the user (to specify a core compiler).
2017-10-20 20:41:25 -07:00
Patrick Gartung
a8ee2a912b buildcache command updates (#5860)
* Add better spec matching to spack buildcache

* skip download of spec.yaml and keys if they exist

* autopep8
2017-10-20 20:33:01 -07:00
Adam J. Stewart
2570dfb4d9 Update Getting Started docs to clarify that full Xcode suite is required for 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-20 17:31:12 -07:00
Todd Gamblin
4dac4736e7 spack blame can take a path to a file in the Spack repo (#5793)
- 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-19 14:27:15 -07:00
Adam J. Stewart
a1c19f8389 Allow documentation to build in Python 3 (#5736) 2017-10-19 00:26:04 -07:00
George Hartzell
464e558aea filter_file, don't remove absent backup file (#5733)
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-17 11:26:05 -07:00
Michael F. Herbst
1952a92820 Minor typos and corections (#5789)
- 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-17 01:36:03 -07:00
Todd Gamblin
100fb1e6ee Exercise more code paths in the git fetcher.
- 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-17 01:26:31 -07:00
Todd Gamblin
d14816cbaf Spack tests no longer clutter var/spack/stage
- 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 01:26:31 -07:00
Todd Gamblin
44bebd7a8f `Package.stage` no longer implicitly makes stage directory
- 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
2017-10-17 01:26:31 -07:00
Todd Gamblin
894a1a73a4 Spack tests no longer use the var/spack/stage directory.
- This prevents the main spack install from being clusttered by
  invocations of `spack test`.

- This uses a session-scoped stage fixture to ensure tests don't
  interfere.
2017-10-17 01:26:31 -07:00
Todd Gamblin
c14f2dc7b4 Spack core and tests no longer use os.chdir()
- Spack's core package interface was previously overly stateful, in that
  calling methods like `do_stage()` could change your working directory.

- This removes Stage's `chdir` and `chdir_to_source` methods and replaces
  their usages with `with working_dir(stage.path)` and `with
  working_dir(stage.source_path)`, respectively.  These ensure the
  original working directory is preserved.

- This not only makes the API more usable, it makes the tests more
  deterministic, as previously a test could leave the current working
  directory in a bad state and cause subsequent tests to fail
  mysteriously.
2017-10-17 01:26:31 -07:00
Adam J. Stewart
6f9036c858 Ensure that FileList makes it into the documentation (#5739) 2017-10-14 06:20:39 +02:00
Todd Gamblin
1ba4c1af63 Clean up logic in Sepc.satisfies_dependencies()
- This puts in a fast path when there are no dependencies to satisfy.

- Reduces time spent to concretize r-rminer by 2x, down to 5s from 10s
2017-10-13 19:46:57 -07:00
Todd Gamblin
afc99ca516 Remove single-root assertion from Spec.root
- Assertion would search for root through all possible paths.
  - It's also really slow.

- This isn't needed anymore. We're pretty good at ensuring single-rooted
  DAGs, and this assertion has never been thrown.

- This shaves another 6 seconds off r-rminer concretization
2017-10-13 19:46:57 -07:00
Todd Gamblin
3f091fb6db Use list instead of OrderedDict to find virtual/external candidates
- This reduces concretization time for r-rminer from over 1 minute to
  only 16 seconds.
  - OrderedDict ends up taking a *lot* of time to compare larger specs.

- An OrderedDict isn't actually needed here.  It's actually not possible
  to find duplicates, and we end up sorting the contents of the
  OrderedDict anyway.
2017-10-13 19:46:57 -07:00
Todd Gamblin
f58c503091 avoid creating lots of dictionaries in traverse_edges()
- This is an optimization to the way traverse_edges iterates over
  successors.

- Previous version called dependencies_dict(), which involved a lot of
  redundant work (creating dicts and calling caonical_deptype)
2017-10-13 19:46:57 -07:00
Todd Gamblin
9ccaf6474d Don't redundantly check for providers of non-virtuals. 2017-10-13 19:46:57 -07:00
Todd Gamblin
55f85f2307 Cache compilers parsed from config files
- Spack ends up constructing compilers frequently from YAML data.

- This caches the result of parsing the compiler config

- The logic in compilers/__init__.py could use a bigger cleanup, but this
  makes concretization much faster for now.

- on macOS, this also ensures that xcrun is called only twice, as opposed
  to every time a new compiler object is constructed.
2017-10-13 19:46:57 -07:00
Patrick Gartung
2e1aa0a5e9 This fixes a bug in creating rpaths relative to $ORIGIN on linux. (#5726)
* This fixes a bug in creating rpaths relative to  on linux.

* fix for macOS as well

* found in testing

* flake8

* fix testing on macOS

* flake8
2017-10-13 19:13:07 -07:00
Axel Huebl
e17765db39 Docker Workflow (#5582)
This adds a workflow section on how to use spack on Docker.

It provides an example on the best-practices I collected over the
last months and circumvents the common pitfalls I tapped in.

Works with MPI, CUDA, Modules, execution as root, etc.

Background: Developed initially for PIConGPU.
2017-10-13 12:17:20 -07:00
Denis Davydov
1b53e82348 various fixes for macOS high sierra (#5647)
* various fixes for macOS high sierra

* add macOS_version() helper function

* flake8 fixes

* update oce and trilinos

* fix bison
2017-10-12 11:41:57 -07:00
David Hows
0dad5b3ee5 Make --trusted default when running spack gpg list (#5678)
* Make --trusted default when running spack gpg list

Currently running `spack gpg list` with no arguments returns nothing. You must supply either the `--trusted` or the `--signing` options. The idea here is to return some initial data to the user when the command is run. The alternative is to return an error, telling the user to select one of the two options.

* Add an extra test case for the empty list command

Fixes the issue with code coverage
2017-10-12 11:14:48 -07:00
Todd Gamblin
65b38764ae Speed up concretization (#5716)
This isn't a rework of the concretizer but it speeds things up a LOT.

The main culprits were:
  1. Variant code, `provider_index`, and `concretize.py` were calling
     `spec.package` when they could use `spec.package_class`
    - `spec.package` looks up a package instance by `Spec`, which requires a
      (fast-ish but not that fast) DAG compare.
    - `spec.package_class` just looks up the package's class by name, and you
        should use this when all you need is metadata (most of the time).
    - not really clear that the current way packages are looked up is
      necessary -- we can consider refactoring that in the future.

  2. `Repository.repo_for_pkg` parses a `str` argument into a `Spec` when
     called with one, via `@_autospec`, but this is not needed.
     - Add some faster code to handle strings directly and avoid parsing

This speeds up concretization 3-9x in my limited tests.  Still not super
fast but much more bearable:

Before:
  - `spack spec xsdk` took 33.6s
  - `spack spec dealii` took 1m39s

After:
  - `spack spec xsdk` takes 6.8s
  - `spack spec dealii` takes 10.8s
2017-10-12 09:52:38 -07:00
Todd Gamblin
b5e136b729 Better install output (#5714)
* Do not call setup_package for fake installs

- setup package could fail if ``setup_dependent_environment`` or other
  routines expected to use executables from dependencies

- xpetsc and boost try to get python config variables in
  `setup_dependent_package`; this would cause them not to be
  fake-installable

* Remove vestigial deptype_query argument to Spec.traverse()

- The `deptype_query` argument isn't used anymore -- it's only passed
  around and causes confusion when calling traverse.

- Get rid of it and just keep the `deptypes` argument

* Don't print redundant messages when installing dependencies

- `do_install()` was originally depth-first recursive, and printed "<pkg>
  already installed in ..." multiple times for packages as recursive
  calls encountered them.

- For much cleaner output, use spec.traverse(order='post') to install
  dependencies instead
2017-10-12 00:49:59 -07:00
Christoph Junghans
cb7628c9a4 compilers/clang: add flang (#5503)
* compilers/clang: add flang

* Update clang.py
2017-10-10 13:52:10 -07:00
George Hartzell
0d1c36e559 Add package for aspell and ass't dictionaries (#3890)
* Add package for aspell and ass't dictionaries

Add a package definition for aspell.

Add a handful of dictionaries to convince myself that the support for
a bunch of dictionaries works.

* Flake8 cleanup

* Use six's version of urlparse

`urlparse` is not python3 friendly.  This works around it (stolen from
`.../cmd/md5.py`).

* Fix incorrect trimming regexp

* Clean up dictionary build

- more parsimonious use of `which` (`make()` has already been made)
- use `sh` instead of `bash`

* Use a helper method to generate info for variants

I figured out my issues with static methods.  I *think* that it this
is pythonic.

* Convert aspell to an extendable package

Convert aspell to be extendable and rework the dictionaries to be
extensions.

As it stands, there's a great deal of cut and paste in the
dictionaries, I'll abstract that out next.

The {de,}activate methods copy a great deal of code out of
package.py.  Perhaps there's a better way....

* Create AspellDictPackage and use it for the dictionaries

Reduce the repeated code, pull it into a base class.

I'm confused about why 'from spack import *' wasn't more useful in the
base class.

* Oops, -de & -es should be AspellDictPackages too

* Typo: pakcage -> package

* Address some commentary

* Update copyright dates, 2016->2017
2017-10-09 14:14:19 -07:00
becker33
5d13f236b4 Fix setup for changes to dirty flag (#5592)
* Pass dirty arg through setup to setup_package
2017-10-09 10:01:55 -07:00
scheibelp
b08d457dfd Don't check package.installed in _mark_concrete if value=True (#5634)
* spec and spec.package.spec can refer to different objects in the
database. When these two instances of spec differ in terms of
the value of the 'concrete' property, Spec._mark_concrete can
fail when checking Spec.package.installed (which requires
package.spec to be concrete). This skips the check for
spec.package.installed when _mark_concrete is called with
'True' (in other words, when the database is marking all specs
as being concrete).

* add test to confirm this fixes #5293
2017-10-06 14:23:28 -07:00