diff --git a/pyproject.toml b/pyproject.toml index 38c9c13..eaa2e5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,6 @@ requires = [ "oldest-supported-numpy; python_version <= '3.8'", "setuptools>=49.5.0", "pybind11", - "cmake" ] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index edb50ed..d530073 100644 --- a/setup.py +++ b/setup.py @@ -32,6 +32,9 @@ def __str__(self): import pybind11 return pybind11.get_include(self.user) +setup_requires = [] +if not sh.which("cmake"): + setup_requires += ["cmake"] cmake_args = [] # What variables from the environment do we wish to pass on to cmake as variables? @@ -119,6 +122,7 @@ def readme(): long_description_content_type='text/markdown', package_dir={'qdldl': 'module'}, include_package_data=True, # Include package data from MANIFEST.in + setup_requires=setup_requires, install_requires=["numpy >= 1.7", "scipy >= 0.13.2"], license='Apache 2.0', url="https://github.com/oxfordcontrol/qdldl-python/",