perl-test-json, perl-json-any: New packages (#42896)
* perl-test-json: New package Adds Test::JSON * Adds perl-json-any
This commit is contained in:
parent
2bae1b7e00
commit
0339690a59
2 changed files with 63 additions and 0 deletions
33
var/spack/repos/builtin/packages/perl-json-any/package.py
Normal file
33
var/spack/repos/builtin/packages/perl-json-any/package.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
# 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 PerlJsonAny(PerlPackage):
|
||||
"""(DEPRECATED) Wrapper Class for the various JSON classes"""
|
||||
|
||||
homepage = "https://metacpan.org/pod/JSON::Any"
|
||||
url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/JSON-Any-1.40.tar.gz"
|
||||
|
||||
maintainers("EbiArnie")
|
||||
|
||||
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
|
||||
|
||||
version("1.40", sha256="083256255a48094fd9ac1239e0fea8a10a2383a9cd1ef4b1c7264ede1b4400ab")
|
||||
|
||||
depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
|
||||
depends_on("perl-test-fatal", type=("build", "test"))
|
||||
depends_on("perl-test-needs", type=("build", "test"))
|
||||
depends_on("perl-test-warnings@0.009:", type=("build", "test"))
|
||||
depends_on("perl-test-without-module", type=("build", "test"))
|
||||
|
||||
def test_use(self):
|
||||
"""Test 'use module'"""
|
||||
options = ["-we", 'use strict; use JSON::Any; print("OK\n")']
|
||||
|
||||
perl = self.spec["perl"].command
|
||||
out = perl(*options, output=str.split, error=str.split)
|
||||
assert "OK" in out
|
30
var/spack/repos/builtin/packages/perl-test-json/package.py
Normal file
30
var/spack/repos/builtin/packages/perl-test-json/package.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# 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 PerlTestJson(PerlPackage):
|
||||
"""Test JSON data"""
|
||||
|
||||
homepage = "https://metacpan.org/pod/Test::JSON"
|
||||
url = "https://cpan.metacpan.org/authors/id/O/OV/OVID/Test-JSON-0.11.tar.gz"
|
||||
|
||||
maintainers("EbiArnie")
|
||||
|
||||
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
|
||||
|
||||
version("0.11", sha256="07c08ab2fcc12850d1ad54fcf6afe9ad1a25a098310c3e7142af1d3cb821d7b3")
|
||||
|
||||
depends_on("perl-json-any@1.2:", type=("build", "run", "test"))
|
||||
depends_on("perl-test-differences@0.47:", type=("build", "run", "test"))
|
||||
|
||||
def test_use(self):
|
||||
"""Test 'use module'"""
|
||||
options = ["-we", 'use strict; use Test::JSON; print("OK\n")']
|
||||
|
||||
perl = self.spec["perl"].command
|
||||
out = perl(*options, output=str.split, error=str.split)
|
||||
assert "OK" in out
|
Loading…
Reference in a new issue