Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cmake dependency only if no system CMake is available #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ requires = [
"oldest-supported-numpy; python_version <= '3.8'",
"setuptools>=49.5.0",
"pybind11",
"cmake"
]
build-backend = "setuptools.build_meta"

4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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/",
Expand Down