perl-chi-driver-memcached: new package (#43011)

Adds CHI::Driver::Memcached.

Modified perl-chi to make the tests work. Testing modules in perl-chi
were not loaded when testing CHI::Driver::Memcached, so added the "run"
type to these.
This commit is contained in:
Arne Becker 2024-03-05 19:46:57 +00:00 committed by GitHub
parent 0c44f5a140
commit 12fba13441
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 38 additions and 7 deletions

View file

@ -0,0 +1,31 @@
# 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 PerlChiDriverMemcached(PerlPackage):
"""Use Memcached for cache storage"""
homepage = "https://metacpan.org/pod/CHI::Driver::Memcached"
url = "https://cpan.metacpan.org/authors/id/J/JS/JSWARTZ/CHI-Driver-Memcached-0.16.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("0.16", sha256="cff9857fbf3f83247b8fc3ab41bdbf141ea0afe23b45109ee0b415f6baadb3c6")
depends_on("perl-chi@0.33:", type=("build", "run", "test"))
depends_on("perl-moose@0.66:", type=("build", "run", "test"))
depends_on("perl-test-class", type=("build", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use CHI::Driver::Memcached; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out

View file

@ -18,7 +18,7 @@ class PerlChi(PerlPackage):
version("0.61", sha256="583545c9e5312bb4193ab16de9f55ff8f4b4a7ded128cee8dd2cb021d4678b5b")
depends_on("perl-cache-cache", type=("build", "test"))
depends_on("perl-cache-cache", type=("build", "run", "test"))
depends_on("perl-carp-assert@0.20:", type=("build", "run", "test"))
depends_on("perl-class-load", type=("build", "run", "test"))
depends_on("perl-data-uuid", type=("build", "run", "test"))
@ -27,19 +27,19 @@ class PerlChi(PerlPackage):
depends_on("perl-json-maybexs@1.003003:", type=("build", "run", "test"))
depends_on("perl-list-moreutils@0.13:", type=("build", "run", "test"))
depends_on("perl-log-any@0.08:", type=("build", "run", "test"))
depends_on("perl-module-mask", type=("build", "test"))
depends_on("perl-module-mask", type=("build", "run", "test"))
depends_on("perl-moo@1.003:", type=("build", "run", "test"))
depends_on("perl-moox-types-mooselike@0.23:", type=("build", "run", "test"))
depends_on("perl-moox-types-mooselike-numeric", type=("build", "run", "test"))
depends_on("perl-string-rewriteprefix", type=("build", "run", "test"))
depends_on("perl-task-weaken", type=("build", "run", "test"))
depends_on("perl-test-class", type=("build", "test"))
depends_on("perl-test-deep", type=("build", "test"))
depends_on("perl-test-exception", type=("build", "test"))
depends_on("perl-test-warn", type=("build", "test"))
depends_on("perl-test-class", type=("build", "run", "test"))
depends_on("perl-test-deep", type=("build", "run", "test"))
depends_on("perl-test-exception", type=("build", "run", "test"))
depends_on("perl-test-warn", type=("build", "run", "test"))
depends_on("perl-time-duration@1.06:", type=("build", "run", "test"))
depends_on("perl-time-duration-parse@0.03:", type=("build", "run", "test"))
depends_on("perl-timedate", type=("build", "test"))
depends_on("perl-timedate", type=("build", "run", "test"))
depends_on("perl-try-tiny@0.05:", type=("build", "run", "test"))
def test_use(self):