Skip to content

Commit

Permalink
Require setuptools>=61. Simplify setup.py w.r.t noisy warning (always…
Browse files Browse the repository at this point in the history
… shown when building with spack).
  • Loading branch information
BenjaminRodenberg committed Jul 9, 2024
1 parent cdced72 commit e116183
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 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
4 changes: 2 additions & 2 deletions spack/repo/packages/py-pyprecice/package.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2013-2023 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 Down Expand Up @@ -58,7 +58,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 e116183

Please sign in to comment.