summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/fetch-options/package.py
blob: 2619ca6e8722843452d0d2d4509066384e5d716c (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-2021 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 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', '00000000000000000000000000000012', fetch_options=cookie)
    version('1.1', '00000000000000000000000000000011', fetch_options=timeout)
    version('1.0', '00000000000000000000000000000010')