summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorArne Becker <101113822+EbiArnie@users.noreply.github.com>2024-01-10 10:28:53 +0000
committerGitHub <noreply@github.com>2024-01-10 11:28:53 +0100
commitfeebd35f910c2925bdafe8f5460b67bc2db9cdcd (patch)
treef3764619574e5706a477f84c925500e7185d03d1 /var
parentf552dbd19918b6c928dd482e1de92d920902f1f3 (diff)
downloadspack-feebd35f910c2925bdafe8f5460b67bc2db9cdcd.tar.gz
spack-feebd35f910c2925bdafe8f5460b67bc2db9cdcd.tar.bz2
spack-feebd35f910c2925bdafe8f5460b67bc2db9cdcd.tar.xz
spack-feebd35f910c2925bdafe8f5460b67bc2db9cdcd.zip
perl-datetime-format-pg: add new package (#42005)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-format-pg/package.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl-datetime-format-pg/package.py b/var/spack/repos/builtin/packages/perl-datetime-format-pg/package.py
new file mode 100644
index 0000000000..533656297c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-datetime-format-pg/package.py
@@ -0,0 +1,32 @@
+# 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 PerlDatetimeFormatPg(PerlPackage):
+ """Parse and format PostgreSQL dates and times"""
+
+ homepage = "https://metacpan.org/pod/DateTime::Format::Pg"
+ url = "https://cpan.metacpan.org/authors/id/D/DM/DMAKI/DateTime-Format-Pg-0.16014.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16014", sha256="38bb9666524dc384c3366f6342cb9656c50bac0f9716a3d44f1cf552ccbe0eb9")
+
+ depends_on("perl-datetime@0.10:", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-builder@0.72:", type=("build", "run", "test"))
+ depends_on("perl-datetime-timezone@0.05:", type=("build", "run", "test"))
+ depends_on("perl-module-build-tiny@0.035:", type=("build"))
+
+ def test_use(self):
+ """Test 'use module'"""
+ options = ["-we", 'use strict; use DateTime::Format::Pg; print("OK\n")']
+
+ perl = self.spec["perl"].command
+ out = perl(*options, output=str.split, error=str.split)
+ assert "OK" in out