Skip to content

Commit

Permalink
remove 'script' dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
perlinm committed Aug 6, 2024
1 parent 9e7b139 commit cfacf20
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions qldpc/external/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
limitations under the License.
"""

import os
import re
import subprocess
import urllib.error
Expand Down Expand Up @@ -114,7 +113,7 @@ def get_generators_from_groupnames(group: str) -> GENERATORS_LIST | None:

def gap_is_installed() -> bool:
"""Is GAP 4 installed?"""
commands = ["script", "-c", "gap --version", os.devnull]
commands = ["gap", "-q", "-c", r'Print("GAP ", GAPInfo.Version, "\n"); QUIT;']
result = subprocess.run(commands, capture_output=True, text=True)
lines = result.stdout.splitlines()
return len(lines) == 2 and lines[1].startswith("GAP 4")
Expand Down

0 comments on commit cfacf20

Please sign in to comment.