From cdde7c3ccf61de94d1770dcb8c0b0e09bbd82732 Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Thu, 24 Oct 2024 03:38:56 -0700 Subject: py-braceexpand: new package (#47186) --- .../builtin/packages/py-braceexpand/package.py | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-braceexpand/package.py diff --git a/var/spack/repos/builtin/packages/py-braceexpand/package.py b/var/spack/repos/builtin/packages/py-braceexpand/package.py new file mode 100644 index 0000000000..6da0bfbfc7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-braceexpand/package.py @@ -0,0 +1,28 @@ +# 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 PyBraceexpand(PythonPackage): + """Bash-style brace expansion""" + + homepage = "https://github.com/trendels/braceexpand" + url = "https://github.com/trendels/braceexpand/archive/refs/tags/v0.1.7.tar.gz" + + license("MIT") + + version("0.1.7", sha256="72eb91b62b2fa2dd7f6044b7a4b46a3761ac61fe5945a2a86a4538447ab47e05") + + # Requires py-typing with python@:3.4 but Spack's minimum python is higher + depends_on("py-setuptools") + + @run_after("install") + def copy_test_files(self): + cache_extra_test_sources(self, "test_braceexpand.py") + + def test_unittests(self): + """run the unit tests""" + with working_dir(self.test_suite.current_test_cache_dir): + python("test_braceexpand.py") -- cgit v1.2.3-70-g09d2