Skip to content

Commit

Permalink
drop homebrewed buildtime version check for numpy and cython, which i…
Browse files Browse the repository at this point in the history
…s superseeded by specs from pyproject.toml
  • Loading branch information
neutrinoceros committed Jun 29, 2021
1 parent 0424adf commit 00be7b9
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from distutils.ccompiler import CCompiler, new_compiler
from distutils.errors import CompileError, LinkError
from distutils.sysconfig import customize_compiler
from distutils.version import LooseVersion
from subprocess import PIPE, Popen
from sys import platform as _platform

Expand Down Expand Up @@ -372,31 +371,6 @@ class build_ext(_build_ext):
# subclass setuptools extension builder to avoid importing cython and numpy
# at top level in setup.py. See http://stackoverflow.com/a/21621689/1382869
def finalize_options(self):
try:
import cython
import numpy
except ImportError as e:
raise ImportError(
"""Could not import cython or numpy. Building yt from source requires
cython and numpy to be installed. Please install these packages using
the appropriate package manager for your python environment."""
) from e
if LooseVersion(cython.__version__) < LooseVersion("0.26.1"):
# keep in sync with pyproject.toml [build-system]
raise RuntimeError(
"""Building yt from source requires Cython 0.26.1 or newer but
Cython %s is installed. Please update Cython using the appropriate
package manager for your python environment."""
% cython.__version__
)
if LooseVersion(numpy.__version__) < LooseVersion("1.13.3"):
# keep in sync with pyproject.toml [build-system]
raise RuntimeError(
"""Building yt from source requires NumPy 1.13.3 or newer but
NumPy %s is installed. Please update NumPy using the appropriate
package manager for your python environment."""
% numpy.__version__
)
from Cython.Build import cythonize

# Override the list of extension modules
Expand Down

0 comments on commit 00be7b9

Please sign in to comment.