From 88f388ce897d0cefe0cd1d7cff3e8508f0482e47 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 9 Jul 2024 11:13:12 +0200 Subject: [PATCH] Require setuptools>=61 (#207) * Require setuptools>=61. Will ensure use of pyproject.toml. * Simplify setup.py w.r.t noisy warning (always shown when building with spack). --- pyproject.toml | 2 +- setup.py | 12 ------------ spack/repo/packages/py-pyprecice/package.py | 10 +++++----- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a618c480..27c696d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] # PEP 518 - minimum build system requirements -requires = ["setuptools", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy", "mpi4py", "pkgconfig"] +requires = ["setuptools>=61", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy", "mpi4py", "pkgconfig"] diff --git a/setup.py b/setup.py index 6018cebd..024a109c 100644 --- a/setup.py +++ b/setup.py @@ -5,17 +5,6 @@ uses_pip = "pip" in __file__ -# check whether pip is used for installation. If pip is not used, dependencies defined in pyproject.toml might be -# missing. -if not uses_pip: - warnings.warn( - "It looks like you are not using pip for installation. Installing the package via 'pip3 install " - "--user .' is recommended. You can still use 'python3 setup.py install --user', if you want and if " - "the bindings work correctly, you do not have to worry. However, if you face problems during " - "installation or running pyprecice, this means that you have to make sure that all dependencies are " - "installed correctly and repeat the installation of pyprecice. Refer to pyproject.toml for a list " - "of dependencies.") - if uses_pip: # If installed with pip we need to check its version try: @@ -45,7 +34,6 @@ " flag.".format(pip.__version__)) from setuptools import setup -from setuptools import Command from setuptools.command.test import test from setuptools.command.install import install from Cython.Distutils.extension import Extension diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index e4af040e..a3ac4432 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -1,4 +1,4 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# 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) @@ -14,12 +14,12 @@ class PyPyprecice(PythonPackage): homepage = "https://precice.org" git = "https://github.com/precice/python-bindings.git" - url = "https://github.com/precice/python-bindings/archive/v2.4.0.0.tar.gz" - maintainers = ["ajaust", "BenjaminRodenberg", "IshaanDesai"] + url = "https://github.com/precice/python-bindings/archive/v2.5.0.1.tar.gz" + maintainers("ajaust", "BenjaminRodenberg", "IshaanDesai") # Always prefer final version of release candidate version("develop", branch="develop") - version("2.5.0.1", sha256="e2602f828d4f907ea93e34f7d4adb8db086044a75a446592a4099423d56ed62c") + version("2.5.0.1", sha256="d7c666e6ebff9e007c3703d8e3c3fcdf0f45289e36c2c17223b3aedc3259ab6c") version("2.5.0.0", sha256="9f55a22594bb602cde8a5987217728569f16d9576ea53ed00497e9046a2e1794") version("2.4.0.0", sha256="e80d16417b8ce1fdac80c988cb18ae1e16f785c5eb1035934d8b37ac18945242") version("2.3.0.1", sha256="ed4e48729b662680beaa4ee2a9aff724a79e760534c6c58181be739988da2789") @@ -50,7 +50,7 @@ class PyPyprecice(PythonPackage): depends_on("precice@" + ver, when="@" + ver) depends_on("python@3:", type=("build", "link", "run")) - depends_on("py-setuptools", type="build") + depends_on("py-setuptools@61:", type="build") depends_on("py-numpy", type=("build", "link", "run")) depends_on("py-mpi4py", type=("build", "run")) depends_on("py-cython@0.29:", type="build")