ProjectQ icon indicating copy to clipboard operation
ProjectQ copied to clipboard

Handle case in _configure_openmp() for MacOS system without Homebrew

Open isobelhooper opened this issue 1 year ago • 1 comments

On a MacOS system that's not using Homebrew, running brew --prefix llvm with subprocess.check_output doesn't produce a CalledProcessError; instead, when the shell produces a FileNotFoundError it passes it back and check_output raises that instead.

If we check for OSError (the parent of FileNotFoundError, which should handle other OS-related errors that could get passed back) as well, then this should correctly handle this case.

The MacPorts check doesn't have the same issue, because the which command is built in and so which port will raise a CalledProcessError if MacPorts isn't installed.

isobelhooper avatar Nov 07 '24 14:11 isobelhooper

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 07 '24 14:11 CLAassistant