Skip to content

Conversation

mhucka
Copy link
Contributor

@mhucka mhucka commented Sep 1, 2025

The default version of grep on macOS (at least through macOS 15) does not take a -P argument, which causes check/pytest to fail due to the call to grep -P on line 432:

grep -Pv '^(.\[0m)?[\.FEsx]+(.\[36m)?\s+\[\s*\d+%\](.\[0m)?$'

The problem is that -P is for using Perl-compatible regular expressions (PCRE), which are not standard in the BSD version of grep that comes with macOS. Switching to grep's extended regex syntax using -E resolves the problem.

mhucka added 2 commits August 31, 2025 21:30
The default version of `grep` on macOS (at least through macOS 15) does
not take a `-P` argument, which causes `check/pytest` to fail due to the
call to `grep -P` on line 432:

```shell
grep -Pv '^(.\[0m)?[\.FEsx]+(.\[36m)?\s+\[\s*\d+%\](.\[0m)?$'
```

The problem is that `-P` is for using Perl-compatible regular
expressions (PCRE), which are not standard in the BSD version of grep
that comes with macOS. Switching to grep's extended regex syntax using
`-E` resolves the problem.
@mhucka mhucka marked this pull request as ready for review September 19, 2025 21:50
@mhucka mhucka added this pull request to the merge queue Sep 19, 2025
Merged via the queue into quantumlib:master with commit dbd13ff Sep 19, 2025
24 checks passed
@mhucka mhucka deleted the mh-fix-1118 branch September 19, 2025 23:56
mhucka added a commit to mhucka/OpenFermion that referenced this pull request Sep 25, 2025
The default version of `grep` on macOS (at least through macOS 15) does
not take a `-P` argument, which causes `check/pytest` to fail due to the
call to `grep -P` on line 432:

```shell
grep -Pv '^(.\[0m)?[\.FEsx]+(.\[36m)?\s+\[\s*\d+%\](.\[0m)?$'
```

The problem is that `-P` is for using Perl-compatible regular
expressions (PCRE), which are not standard in the BSD version of grep
that comes with macOS. Switching to grep's extended regex syntax using
`-E` resolves the problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants