mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-ps: fix build error
``` Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/lilac2/worker.py", line 216, in main with load_lilac(Path('.')) as mod: File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/lilac2/lilacpy.py", line 46, in load_lilac spec.loader.exec_module(mod) File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/share/lilac/Packages/BioArchLinux/r-ps/lilac.py", line 7, in <module> from lilac_r_utils import r_pre_build File "/usr/share/lilac/Packages/lilac-extensions/lilac_r_utils.py", line 2, in <module> from lilaclib import _G, edit_file, run_protected ImportError: cannot import name '_G' from 'lilaclib' (/usr/lib/python3.11/site-packages/lilaclib.py) ```
This commit is contained in:
parent
27704c23ce
commit
560945eb74
4 changed files with 10 additions and 8 deletions
|
@ -8,6 +8,7 @@ from lilac_r_utils import r_pre_build
|
|||
|
||||
def pre_build():
|
||||
r_pre_build(
|
||||
_G,
|
||||
expect_systemrequirements = "GNU make",
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ sys.path.append(os.path.normpath(f'{__file__}/../../../lilac-extensions'))
|
|||
from lilac_r_utils import r_pre_build
|
||||
|
||||
def pre_build():
|
||||
r_pre_build()
|
||||
r_pre_build(_G)
|
||||
|
||||
def post_build():
|
||||
git_pkgbuild_commit()
|
||||
|
|
|
@ -6,4 +6,4 @@ update_on:
|
|||
cran: ps
|
||||
- alias: r
|
||||
- source: manual
|
||||
manual: 1
|
||||
manual: 2
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
from lilac2.const import PACMAN_DB_DIR
|
||||
from lilaclib import _G, edit_file, run_protected
|
||||
from lilaclib import edit_file, run_protected
|
||||
import pyalpm
|
||||
import tarfile
|
||||
from types import SimpleNamespace
|
||||
|
||||
def r_update_pkgver_and_pkgrel():
|
||||
def r_update_pkgver_and_pkgrel(_G: SimpleNamespace):
|
||||
"""
|
||||
Update _pkgver and pkgrel used in R packages.
|
||||
|
||||
|
@ -320,7 +321,7 @@ all_checks = [
|
|||
check_arch,
|
||||
]
|
||||
|
||||
def r_check_pkgbuild(cfg: CheckConfig):
|
||||
def r_check_pkgbuild(_G: SimpleNamespace, cfg: CheckConfig):
|
||||
pkgbuild = Pkgbuild()
|
||||
cfg.default_r_pkgs = get_default_r_pkgs()
|
||||
errors = []
|
||||
|
@ -337,8 +338,8 @@ def r_check_pkgbuild(cfg: CheckConfig):
|
|||
errors = '\n'.join(errors)
|
||||
raise CheckFailed(f"Check failed:\n{errors}")
|
||||
|
||||
def r_pre_build(**kwargs):
|
||||
def r_pre_build(_G: SimpleNamespace, **kwargs):
|
||||
cfg = CheckConfig(**kwargs)
|
||||
r_update_pkgver_and_pkgrel()
|
||||
r_update_pkgver_and_pkgrel(_G)
|
||||
run_protected(["updpkgsums"])
|
||||
r_check_pkgbuild(cfg)
|
||||
r_check_pkgbuild(_G, cfg)
|
||||
|
|
Loading…
Add table
Reference in a new issue