spack/lib/spack/llnl
Peter Scheibel 9cde25b39e
Allow / in GitVersion (#39398)
This commit allows version specifiers to refer to git branches that contain
forward slashes. For example, the following is valid syntax now:

    pkg@git.releases/1.0
   
It also adds a new method `Spec.format_path(fmt)` which is like `Spec.format`,
but also maps unsafe characters to `_` after interpolation. The difference is
as follows:

    >>> Spec("pkg@git.releases/1.0").format("{name}/{version}")
    'pkg/git.releases/1.0'

    >>> Spec("pkg@git.releases/1.0").format_path("{name}/{version}")
    'pkg/git.releases_1.0'

The `format_path` method is used in all projections. Notice that this method
also maps `=` to `_`

    >>> Spec("pkg@git.main=1.0").format_path("{name}/{version}")
    'pkg/git.main_1.0'
   
which should avoid syntax issues when `Spec.prefix` is literally copied into a
Makefile as sometimes happens in AutotoolsPackage or MakefilePackage
2023-10-17 20:33:59 +02:00
..
util Allow / in GitVersion (#39398) 2023-10-17 20:33:59 +02:00
__init__.py license year bump (#34921) 2023-01-18 14:30:17 -08:00
path.py Partial removal of circular dependencies between spack and llnl (#40090) 2023-09-28 16:21:52 +00:00
string.py Partial removal of circular dependencies between spack and llnl (#40090) 2023-09-28 16:21:52 +00:00
url.py Group primitive url/path handling functions together (#40028) 2023-09-15 15:43:23 +02:00