From a3dc9e1eb8cfb018becafd38dc4a9af7cf6c13af Mon Sep 17 00:00:00 2001 From: 吴坎 Date: Fri, 27 Sep 2024 19:37:58 +0800 Subject: py-altair: add v5.4.1 (#46461) * Update py-altair@5.4.1 * Update * Update var/spack/repos/builtin/packages/py-altair/package.py Co-authored-by: Wouter Deconinck * Update var/spack/repos/builtin/packages/py-altair/package.py Co-authored-by: Wouter Deconinck --------- Co-authored-by: Wouter Deconinck --- .../repos/builtin/packages/py-altair/package.py | 21 +++++++++++++++------ .../repos/builtin/packages/py-narwhals/package.py | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-narwhals/package.py diff --git a/var/spack/repos/builtin/packages/py-altair/package.py b/var/spack/repos/builtin/packages/py-altair/package.py index af10abc209..4fcccc4816 100644 --- a/var/spack/repos/builtin/packages/py-altair/package.py +++ b/var/spack/repos/builtin/packages/py-altair/package.py @@ -9,10 +9,11 @@ from spack.package import * class PyAltair(PythonPackage): """Declarative statistical visualization library for Python""" - pypi = "altair/altair-5.2.0.tar.gz" + pypi = "altair/altair-5.4.1.tar.gz" license("BSD-3-Clause") + version("5.4.1", sha256="0ce8c2e66546cb327e5f2d7572ec0e7c6feece816203215613962f0ec1d76a82") version("5.2.0", sha256="2ad7f0c8010ebbc46319cc30febfb8e59ccf84969a201541c207bc3a4fa6cf81") version("5.1.2", sha256="e5f52a71853a607c61ce93ad4a414b3d486cd0d46ac597a24ae8bd1ac99dd460") version("5.1.1", sha256="ad6cd6983c8db69a34dd68e42653f6172b7fc3775b7190005107f1b4fc60d64d") @@ -23,6 +24,10 @@ class PyAltair(PythonPackage): version("4.2.1", sha256="4939fd9119c57476bf305af9ca0bd1aa7779b2450b874d3623660e879d0fcad1") version("4.2.0", sha256="d87d9372e63b48cd96b2a6415f0cf9457f50162ab79dc7a31cd7e024dd840026") + variant("pandas", default=True, description="Enable pandas support") + + conflicts("~pandas", when="@:5.3.0") + depends_on("python@3.7:", type=("build", "run")) depends_on("py-setuptools@40.6:", type="build", when="@:4") depends_on("py-entrypoints", type=("build", "run"), when="@2.0.0:4") @@ -30,11 +35,15 @@ class PyAltair(PythonPackage): depends_on("py-hatchling", type=("build"), when="@5.0.0:") depends_on("py-importlib-metadata", type=("build", "run"), when="@5.0.0:5.0") - depends_on("py-typing-extensions@4.0.1:", type=("build", "run"), when="@5.0.0: ^python@:3.10") + depends_on( + "py-typing-extensions@4.0.1:", type=("build", "run"), when="@5.0.0:5.3.0 ^python@:3.10" + ) + depends_on("py-typing-extensions@4.10.0:", type=("build", "run"), when="@5.4.0: ^python@:3.13") depends_on("py-jinja2", type=("build", "run")) depends_on("py-jsonschema@3.0.0:", type=("build", "run")) - depends_on("py-numpy", type=("build", "run")) - depends_on("py-pandas@0.18:", type=("build", "run")) - depends_on("py-pandas@0.25:", type=("build", "run"), when="@5.1.0:") - depends_on("py-toolz", type=("build", "run")) + depends_on("py-numpy", type=("build", "run"), when="+pandas") + depends_on("py-pandas@0.18:", type=("build", "run"), when="+pandas") + depends_on("py-pandas@0.25:", type=("build", "run"), when="@5.1.0:+pandas") + depends_on("py-toolz", type=("build", "run"), when="@:5.3.0") depends_on("py-packaging", type=("build", "run"), when="@5.1.0:") + depends_on("py-narwhals@1.5.2:", type=("build", "run"), when="@5.4.0:") diff --git a/var/spack/repos/builtin/packages/py-narwhals/package.py b/var/spack/repos/builtin/packages/py-narwhals/package.py new file mode 100644 index 0000000000..48899ac9d0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-narwhals/package.py @@ -0,0 +1,18 @@ +# 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 PyNarwhals(PythonPackage): + """Extremely lightweight compatibility layer between dataframe libraries""" + + homepage = "https://github.com/narwhals-dev/narwhals" + pypi = "narwhals/narwhals-1.8.1.tar.gz" + + version("1.8.1", sha256="97527778e11f39a1e5e2113b8fbb9ead788be41c0337f21852e684e378f583e8") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-hatchling", type=("build")) -- cgit v1.2.3-70-g09d2