spack/var/spack/repos/builtin/packages/perl-module-mask/package.py
Arne Becker d4ffe244af
perl-chi and deps: new packages (#42959)
* perl-chi and deps: new packages

Adds CHI and its dependencies.
Installed OK with build-time tests. Added dependencies:
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI

* Add license
2024-03-04 08:59:33 -08:00

31 lines
1.0 KiB
Python

# Copyright 2013-2024 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 PerlModuleMask(PerlPackage):
"""Pretend certain modules are not installed"""
homepage = "https://metacpan.org/pod/Module::Mask"
url = "https://cpan.metacpan.org/authors/id/M/MA/MATTLAW/Module-Mask-0.06.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("0.06", sha256="2d73f81ff21c9fa28102791e546ff257164b3025f7832544c8223fb87c1e7e77")
depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
depends_on("perl-module-util@1.00:", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Module::Mask; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out