mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 02:54:16 +02:00
gem selector sketch
This commit is contained in:
13
bauh/gems/arch/pkgbuild.py
Normal file
13
bauh/gems/arch/pkgbuild.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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))
|
||||
Reference in New Issue
Block a user