spack/var/spack/repos/builtin/packages/perl-plack-middleware-assets/package.py
Arne Becker cd332c6370
perl-plack-middleware-assets and deps: new packages (#42990)
This adds Plack::Middleware::Assets and its missing deps:
- CSS::Minifier::XS
- JavaScript::Minifier::XS
- Test::DiagINC
2024-03-05 11:59:52 -08:00

33 lines
1.2 KiB
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 PerlPlackMiddlewareAssets(PerlPackage):
"""Concatenate and minify JavaScript and CSS files"""
homepage = "https://metacpan.org/pod/Plack::Middleware::Assets"
url = "https://cpan.metacpan.org/authors/id/P/PE/PERLER/Plack-Middleware-Assets-1.0.0.tar.gz"
maintainers("EbiArnie")
license("BSD")
version("1.0.0", sha256="fb43c9fb7e395efcb75baeed9dc1a4546d6d7ad387761238b0568673ace0ce84")
depends_on("perl-css-minifier-xs", type=("build", "run", "test"))
depends_on("perl-http-date", type=("build", "run", "test"))
depends_on("perl-javascript-minifier-xs", type=("build", "run", "test"))
depends_on("perl-plack", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Plack::Middleware::Assets; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out