From 98e206193b4bff9f28d1e6ecb0a738c19cc8741a Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Tue, 6 Aug 2024 05:26:27 +0100 Subject: py-configspace: add main, 1.0.0, 1.0.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, fix url and fix cython dependency (#45193) * [py-configspace] fix dependency on cython * py-cython not needed starting from 1.0.0 * added py-configspace 1.0.0 and 1.0.1 * py-configspace: fix style * added py-configspace version 1.1.0 * added py-configspace version 1.1.1 * py-configspace: two more versions and new maintainer * py-configspace: fixed typo * py-configspace: added version 1.1.4 --- .../builtin/packages/py-configspace/package.py | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-configspace/package.py b/var/spack/repos/builtin/packages/py-configspace/package.py index 64dfd9d447..6a392b6276 100644 --- a/var/spack/repos/builtin/packages/py-configspace/package.py +++ b/var/spack/repos/builtin/packages/py-configspace/package.py @@ -10,13 +10,21 @@ class PyConfigspace(PythonPackage): """Creation and manipulation of parameter configuration spaces for automated algorithm configuration and hyperparameter tuning.""" - maintainers("Kerilk") + maintainers("Kerilk", "mdorier") homepage = "https://automl.github.io/ConfigSpace/master/" - pypi = "ConfigSpace/ConfigSpace-0.4.20.tar.gz" + pypi = "configspace/configspace-1.0.0.tar.gz" license("BSD-3-Clause") + version("main", git="https://github.com/automl/ConfigSpace.git", branch="main") + version("1.1.4", sha256="afd625a9bcf4c01efa06114ce9dcc718cf9cba68910b602849b1c59654415762") + version("1.1.3", sha256="8b77e77bd1c286a57e35da87552e33052f6793ddbcc696a9fc62425f60739ac2") + version("1.1.2", sha256="8cd77438f976ce65ce2d056fbd659d12ca1425fe230b737942261879b7c542f0") + version("1.1.1", sha256="450e5dccb52ffc56ec5ade131eaa95207412e1fa44883d611e024fc185a54bf0") + version("1.1.0", sha256="84f20d2b78365a33820558749975667e9bb81d8fb283fcf2ef5bae6052745481") + version("1.0.1", sha256="ffaf2c02db1df47589d5501178827e945d3f953f2812e7e44a9c3029ea13a543") + version("1.0.0", sha256="cc55ac8a550c86bee7853417f1eda22d46185fb911b5875754619735966e2736") version("0.7.1", sha256="57b5b8e28ed6ee14ecf6206fdca43ca698ef63bc1531f081d482b26acf4edf1a") version("0.6.1", sha256="b0a9487c7997481a041feee46f2c8fc9fb9787e1ff553250838d62624dfb0d5a") version("0.6.0", sha256="9b6c95d8839fcab220372673214b3129b45dcd8b1179829eb2c65746cacb72a9") @@ -29,8 +37,20 @@ class PyConfigspace(PythonPackage): depends_on("python@3.7:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-numpy", type=("build", "run")) - depends_on("py-cython", type="build") + depends_on("py-cython@:0.29.36", type="build", when="@:0.9.9") depends_on("py-pyparsing", type=("build", "run")) depends_on("py-scipy", when="@0.4.21:") depends_on("py-typing-extensions", when="@0.6.0:") depends_on("py-more-itertools", when="@0.6.1:") + + def url_for_version(self, version): + new_url = ( + "https://files.pythonhosted.org/packages/source/c/configspace/configspace-{0}.tar.gz" + ) + old_url = ( + "https://files.pythonhosted.org/packages/source/C/ConfigSpace/ConfigSpace-{0}.tar.gz" + ) + if version >= Version("1.0.0"): + return new_url.format(version) + else: + return old_url.format(version) -- cgit v1.2.3-70-g09d2