Skip to content

Commit

Permalink
Require setuptools>=61 (#207)
Browse files Browse the repository at this point in the history
* Require setuptools>=61. Will ensure use of pyproject.toml.
* Simplify setup.py w.r.t noisy warning (always shown when building with spack).
  • Loading branch information
BenjaminRodenberg committed Aug 27, 2024
1 parent 23a5645 commit 88f388c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"]
12 changes: 0 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions spack/repo/packages/py-pyprecice/package.py
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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")
Expand Down Expand Up @@ -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("[email protected]:", type="build")
Expand Down

0 comments on commit 88f388c

Please sign in to comment.