Files
spack/var/spack/repos/builtin/packages/perl-datetime-format-strptime/package.py
Arne Becker 85cdf37d3b perl-datetime-format-strptime: New package (#41676)
* perl-datetime-format-strptime: New package
  Adds package:
  - perl-datetime-format-strptime
  And adds these because they are test dependencies:
  - perl-test-file-sharedir
  - perl-test2-plugin-nowarnings
  - perl-test2-suite
  And modifies these to enable build time tests:
  - perl-b-hooks-endofscope
  - perl-class-singleton
  - perl-datetime-locale
  - perl-datetime-timezone
  - perl-file-sharedir
  - perl-namespace-autoclean
  - perl-namespace-clean
  - perl-params-validationcompiler
  - perl-specio
* Add myself as maintainer
2023-12-14 12:47:40 -08:00

36 lines
1.5 KiB
Python

# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PerlDatetimeFormatStrptime(PerlPackage):
"""Parse and format strp and strf time patterns"""
homepage = "https://metacpan.org/pod/DateTime::Format::Strptime"
url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-Strptime-1.79.tar.gz"
maintainers("EbiArnie")
version("1.79", sha256="701e46802c86ed4d88695c1a6dacbbe90b3390beeb794f387e7c792300037579")
depends_on("perl-datetime@1.00:", type=("build", "run", "test"))
depends_on("perl-datetime-locale@1.30:", type=("build", "run", "test"))
depends_on("perl-datetime-timezone@2.09:", type=("build", "run", "test"))
depends_on("perl-params-validationcompiler", type=("build", "run", "test"))
depends_on("perl-specio@0.33:", type=("build", "run", "test"))
depends_on("perl-test-fatal", type=("build", "test"))
depends_on("perl-test-warnings", type=("build", "test"))
depends_on("perl-try-tiny", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use DateTime::Format::Strptime; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out