Conversation
…Decided to prepend flag names with + for clarity in spec names and ease of parsing. Also generalized variants, although there is not yet a way to specify a generalized (name=value) variant.
Flags are passed from the command line all the way through
build environments to environment variables.
Flags are specified using +name=value and values are quoted
using escaped quotes when necessary.
Future work includes using the flags in the compiler wrapper script
and hopefully updating the parser for a gentler user experience of
the spec language.
…. Seems to have solved error in normalize.
…hin the compiler string. Added -f option to find command; with -f, find prints flags
…d cflag concretizer to concretize each flag individually, allowing us to have unconcretized FlagMap objects for find and uninstall. Now empty flags in find match any, whereas specifying +cflags=\'\' matches only those with empty strings for flags
… them from printed format
…to the root before normalize/concretize
|
I really like the |
|
@adamjstewart: referring to specs by hash is v. nice too :). Thanks @becker33 |
|
Will this change also support |
|
yes. |
|
What's the current status on this pull request? I could really use this functionality... I appreciate the work that @becker33 has done on this. |
|
@aaroncblack: this is on @becker33's list after #561, which adds cray support, better architecture support, and support for module-loaded compilers. We need that one in to get ORNL and NERSC going, and it also has compiler support that is needed for this PR. |
|
To be complete, a sixth flag |
lib/spack/spack/spec.py
Outdated
| print "You can either:" | ||
| print " a) Use a more specific hash, or" | ||
| print " b) Specify the package by name." | ||
| sys.exit(1) |
There was a problem hiding this comment.
Parser should raise some type of ParseException (e.g. an AmbiguousHashError that extends ParseError) rather than printing all this and exiting. Give the caller a chance to handle the error. Also the parser shouldn't be responsible for any user interaction.
|
@becker33: Ok I went over this and put a few comments in. It's nearly ready to go. There are a few things that need to get done though:
|
|
Where can I find the documentation for this? |
|
Do I understand correctly that the "variant=value" syntax didn't actually make it in from this PR? |
* Removes the extra argument from Package.do_install while maintaining the changes in behavior pulled in #1603 * install : removed -i and -d shorthands (breaks backward compatibility) * Change ':' to ','
* Fixed parser to eliminate need for escape quotes. TODO: Fix double call to shlex, fix spaces in spec __str__ * Fixed double shlex * cleanup * rebased on develop * Fixed parsing for multiple specs; broken since #360 * Revoked elimination of the `-` sigil in the syntax, and added it back into tests * flake8 * more flake8 * Cleaned up dead code and added comments to parsing code * bugfix for spaces in arguments; new bug found in testing * Added unit tests for kv pairs in parsing/lexing * Even more flake8 * ... yet another flake8 * Allow multiple specs in install * unfathomable levels of flake8 * Updated documentation to match parser fix
| deps_strict = strict | ||
| if not (self.name and other.name): | ||
| deps_strict=True |
Added version 4.1.6 to the openmpi package
New features:
- variants can be specified by 'name=value' as well, supporting arbitary values
- cflags=
- cxxflags=
- fflags=
- ldflags=
- ldlibs=
- cppflags=
- values must be escape-quoted (spack install foo cflags="-O1 -ansi") on the command line
- they can be normally quoted from within python
- These defaults will be applied to every package using that compiler
- The same five flags are supported
- The syntax is the same as for compiler paths (flag: value)
- specified by name= on command line
- if the value is a string 'True' of 'false' (any capitalization) that is a synonym for the current syntax
- the existing syntax will still work.
- Hashes are prefaced by the '/' symbol
- E.G.
spack uninstall /phrk- The length of the hash reference doesn't matter
- If it's long enough to specify a single spec, it will work.
- spack find %gcc will return all specs built with gcc
- Works with all parameters
- This option prints specs including user supplied compiler flags
- Includes flags from both command line and config file.