mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
14 lines
350 B
Python
14 lines
350 B
Python
import re
|
|
from typing import Set
|
|
|
|
RE_PKGBUILD_OPTDEPS = re.compile(r"optdepends = ([^:\s]+)")
|
|
RE_PKGBUILD_DEPSON = re.compile(r"depends = ([^:\s]+)")
|
|
|
|
|
|
def read_optdeps(srcinfo: str) -> Set[str]:
|
|
return set(RE_PKGBUILD_OPTDEPS.findall(srcinfo))
|
|
|
|
|
|
def read_depends_on(srcinfo: str) -> Set[str]:
|
|
return set(RE_PKGBUILD_DEPSON.findall(srcinfo))
|