summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/fetch-options/package.py
blob: 74a1215074000d6c1ec9adfce31ea510972e1b67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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 FetchOptions(Package):
    """Mock package with fetch_options."""

    homepage = "http://www.fetch-options-example.com"

    url = "https://example.com/some/tarball-1.0.tar.gz"

    fetch_options = {"timeout": 42, "cookie": "foobar"}
    timeout = {"timeout": 65}
    cookie = {"cookie": "baz"}

    version("1.2", md5="00000000000000000000000000000012", fetch_options=cookie)
    version("1.1", md5="00000000000000000000000000000011", fetch_options=timeout)
    version("1.0", md5="00000000000000000000000000000010")