[+] use meson from venv
1. fix typing for tomllib, since it is found in python <3.11
This commit is contained in:
parent
b4199d3faa
commit
66e32b4fc9
@ -5,7 +5,7 @@ project(
|
||||
).stdout().strip('\n'),
|
||||
# 'online.fxreader.uv',
|
||||
# ['c', 'cpp'],
|
||||
version: '0.1.5.17+27.2',
|
||||
version: '0.1.5.17+27.3',
|
||||
# default_options: [
|
||||
# 'cpp_std=c++23',
|
||||
# # 'prefer_static=true',
|
||||
|
@ -421,10 +421,13 @@ class CLI(abc.ABC):
|
||||
argv = pyproject_tool.meson.args.install + argv
|
||||
|
||||
cmd = [
|
||||
shutil_which(
|
||||
'meson',
|
||||
True,
|
||||
),
|
||||
str(self.dist_settings.python_path),
|
||||
'-m',
|
||||
'mesonbuild.mesonmain',
|
||||
# shutil_which(
|
||||
# 'meson',
|
||||
# True,
|
||||
# ),
|
||||
'install',
|
||||
'-C',
|
||||
str(project.build_dir / 'meson'),
|
||||
@ -496,10 +499,12 @@ class CLI(abc.ABC):
|
||||
|
||||
subprocess.check_call(
|
||||
[
|
||||
shutil_which(
|
||||
'meson',
|
||||
True,
|
||||
),
|
||||
str(self.dist_settings.python_path),
|
||||
'mesonbuild.mesonmain',
|
||||
# shutil_which(
|
||||
# 'meson',
|
||||
# True,
|
||||
# ),
|
||||
'test',
|
||||
'-C',
|
||||
project.build_dir / 'meson',
|
||||
@ -519,10 +524,13 @@ class CLI(abc.ABC):
|
||||
|
||||
subprocess.check_call(
|
||||
[
|
||||
shutil_which(
|
||||
'meson',
|
||||
True,
|
||||
),
|
||||
str(self.dist_settings.python_path),
|
||||
'-m',
|
||||
'mesonbuild.mesonmain',
|
||||
# shutil_which(
|
||||
# 'meson',
|
||||
# True,
|
||||
# ),
|
||||
'compile',
|
||||
'-C',
|
||||
project.build_dir / 'meson',
|
||||
@ -572,10 +580,13 @@ class CLI(abc.ABC):
|
||||
extra_args = pyproject_tool.meson.args.setup + extra_args
|
||||
|
||||
cmd = [
|
||||
shutil_which(
|
||||
'meson',
|
||||
True,
|
||||
),
|
||||
# shutil_which(
|
||||
# 'meson',
|
||||
# True,
|
||||
# ),
|
||||
str(self.dist_settings.python_path),
|
||||
'-m',
|
||||
'mesonbuild.mesonmain',
|
||||
'setup',
|
||||
str(project.source_dir),
|
||||
str(project.build_dir / 'meson'),
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import glob
|
||||
import importlib
|
||||
import json
|
||||
import io
|
||||
import tempfile
|
||||
@ -18,6 +19,7 @@ from typing import (
|
||||
cast,
|
||||
Type,
|
||||
TypeVar,
|
||||
Callable,
|
||||
)
|
||||
from typing_extensions import (
|
||||
Self,
|
||||
@ -30,17 +32,23 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
def toml_load(f: BinaryIO) -> Any:
|
||||
try:
|
||||
import tomllib
|
||||
tomllib = importlib.import_module('tomllib')
|
||||
|
||||
return tomllib.load(f)
|
||||
except:
|
||||
return cast(
|
||||
Callable[[Any], Any],
|
||||
getattr(
|
||||
tomllib,
|
||||
'load',
|
||||
),
|
||||
)(f)
|
||||
except ModuleNotFoundError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import tomli
|
||||
|
||||
return tomli.load(f)
|
||||
except:
|
||||
except ModuleNotFoundError:
|
||||
pass
|
||||
|
||||
raise NotImplementedError
|
||||
|
BIN
releases/whl/online_fxreader_pr34-0.1.5.17+27.3-py3-none-any.whl
(Stored with Git LFS)
Normal file
BIN
releases/whl/online_fxreader_pr34-0.1.5.17+27.3-py3-none-any.whl
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user