spack/var/spack/repos/builtin/packages/perl-rose-datetime/package.py
Arne Becker 7f9e8bc41c
perl-rose-datetime: New package plus updates (#41744)
* perl-rose-datetime: New package plus updates

- perl-rose-datetime: New package
- perl-datetime: New version, updated dependencies to enable build
  time tests and added a runtime test

* Remove copyright line

* New year
2024-01-10 14:51:07 -08:00

29 lines
990 B
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 PerlRoseDatetime(PerlPackage):
"""DateTime helper functions and objects."""
homepage = "https://metacpan.org/pod/Rose::DateTime"
url = "https://cpan.metacpan.org/authors/id/J/JS/JSIRACUSA/Rose-DateTime-0.540.tar.gz"
maintainers("EbiArnie")
version("0.540", sha256="1e42802d0944e9669599b7d0dea1e77a0d17a42123f8ca555180db4e7218e34a")
depends_on("perl-datetime", type=("build", "run", "test"))
depends_on("perl-rose-object@0.82:", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Rose::DateTime; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out