spack/var/spack/repos/builtin.mock/packages/external-non-default-variant/package.py
Harmen Stoppels d51af675ef
make version(...) kwargs explicit (#36998)
- [x] Replace `version(ver, checksum=None, **kwargs)` signature with
      `version(ver, checksum=None, *, sha256=..., ...)` explicitly listing all arguments.
- [x] Fix various issues in packages:
  - `tags` instead of `tag`
  - `default` instead of `preferred`
  - `sha26` instead of `sha256`
  - etc

Also, use `sha256=...` consistently.

Note: setting `sha256` currently doesn't validate the checksum length, so you could do
`sha256="a"*32` and it would get checked as `md5`... but that's something for another PR.
2023-04-19 14:17:47 -07:00

18 lines
632 B
Python

# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class ExternalNonDefaultVariant(Package):
"""An external that is registered with a non-default value"""
homepage = "http://www.python.org"
url = "http://www.python.org/ftp/python/3.8.7/Python-3.8.7.tgz"
version("3.8.7", md5="be78e48cdfc1a7ad90efff146dce6cfe")
variant("foo", default=True, description="just a variant")
variant("bar", default=True, description="just a variant")