perl-chart-gnuplot: new package (#42983)

Adds Chart::Gnuplot
This commit is contained in:
Arne Becker 2024-03-05 20:03:00 +00:00 committed by GitHub
parent 7bcb0fff7d
commit 2f4266161c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,27 @@
# 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 PerlChartGnuplot(PerlPackage):
"""Plot graph using Gnuplot in Perl on the fly"""
homepage = "https://metacpan.org/pod/Chart::Gnuplot"
url = "https://cpan.metacpan.org/authors/id/K/KW/KWMAK/Chart/Gnuplot/Chart-Gnuplot-0.23.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("0.23", sha256="dcb46c0f93436464bdc3403469c828c6c33e954123a2adf4092fbb30bb244b6c")
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Chart::Gnuplot; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out