[+] update cli
This commit is contained in:
parent
01aab0517a
commit
905241a068
2
deps/com.github.aiortc.aiortc
vendored
2
deps/com.github.aiortc.aiortc
vendored
@ -1 +1 @@
|
||||
Subproject commit e27d400c07ddbe66e1ef73da1a5754c28cfec157
|
||||
Subproject commit 352e3f68754ab93eb8449ee0751b40991f5a6b73
|
@ -141,7 +141,10 @@ class CLI(abc.ABC):
|
||||
if not d.args is None:
|
||||
cmd.extend(d.args)
|
||||
|
||||
subprocess.check_call(cmd)
|
||||
subprocess.check_call(
|
||||
cmd,
|
||||
cwd=d.source_path,
|
||||
)
|
||||
else:
|
||||
raise NotImplementedError
|
||||
|
||||
@ -196,6 +199,7 @@ class CLI(abc.ABC):
|
||||
force: Optional[bool] = None,
|
||||
env: Optional[dict[str, str]] = None,
|
||||
mypy: bool = False,
|
||||
tests: bool = False,
|
||||
) -> None:
|
||||
project = self.projects[project_name]
|
||||
|
||||
@ -212,6 +216,11 @@ class CLI(abc.ABC):
|
||||
# assert argv is None or len(argv) == 0
|
||||
|
||||
if not project.meson_path is None:
|
||||
if tests:
|
||||
self.meson_test(
|
||||
project_name=project_name,
|
||||
)
|
||||
|
||||
self.meson_install(
|
||||
project_name=project_name,
|
||||
force=force,
|
||||
@ -257,6 +266,16 @@ class CLI(abc.ABC):
|
||||
env=dict(list(os.environ.items())) | env,
|
||||
)
|
||||
|
||||
if tests:
|
||||
subprocess.check_call(
|
||||
[
|
||||
'ninja',
|
||||
'-C',
|
||||
str(project.build_dir / 'pyproject'),
|
||||
'test',
|
||||
]
|
||||
)
|
||||
|
||||
def meson_install(
|
||||
self,
|
||||
project_name: str,
|
||||
@ -316,6 +335,25 @@ class CLI(abc.ABC):
|
||||
*argv,
|
||||
])
|
||||
|
||||
def meson_test(
|
||||
self,
|
||||
project_name: str,
|
||||
argv: Optional[list[str]] = None,
|
||||
) -> None:
|
||||
project = self.projects[project_name]
|
||||
|
||||
if argv is None:
|
||||
argv = []
|
||||
|
||||
subprocess.check_call([
|
||||
shutil_which('meson', True,),
|
||||
'test',
|
||||
'-C',
|
||||
project.build_dir / 'meson',
|
||||
*argv,
|
||||
])
|
||||
|
||||
|
||||
def meson_compile(
|
||||
self,
|
||||
project_name: str,
|
||||
|
@ -115,8 +115,21 @@ def env_bootstrap(
|
||||
bootstrap_settings: BootstrapSettings,
|
||||
pyproject: PyProject,
|
||||
) -> None:
|
||||
pip_find_links : list[pathlib.Path] = []
|
||||
|
||||
if not pyproject.pip_find_links is None:
|
||||
pip_find_links.extend(pyproject.pip_find_links)
|
||||
|
||||
pip_find_links_args = sum([
|
||||
['-f', str(o),]
|
||||
for o in pip_find_links
|
||||
], [])
|
||||
|
||||
subprocess.check_call([
|
||||
'uv', 'venv', '--seed', '--offline',
|
||||
'uv', 'venv',
|
||||
*pip_find_links_args,
|
||||
# '--seed',
|
||||
'--offline',
|
||||
str(bootstrap_settings.env_path)
|
||||
])
|
||||
|
||||
@ -124,16 +137,18 @@ def env_bootstrap(
|
||||
'uv',
|
||||
'pip',
|
||||
'install',
|
||||
*pip_find_links_args,
|
||||
'-p',
|
||||
bootstrap_settings.python_path,
|
||||
'--offline',
|
||||
'uv',
|
||||
'uv', 'pip',
|
||||
])
|
||||
|
||||
subprocess.check_call([
|
||||
bootstrap_settings.python_path,
|
||||
'-m',
|
||||
'uv', 'pip', 'install',
|
||||
*pip_find_links_args,
|
||||
'--offline',
|
||||
'build', 'setuptools', 'meson-python', 'pybind11',
|
||||
])
|
||||
@ -153,11 +168,6 @@ def env_bootstrap(
|
||||
# *early_wheels,
|
||||
# ])
|
||||
|
||||
pip_find_links : list[pathlib.Path] = []
|
||||
|
||||
if not pyproject.pip_find_links is None:
|
||||
pip_find_links.extend(pyproject.pip_find_links)
|
||||
|
||||
if pyproject.early_features:
|
||||
early_dependencies = sum([
|
||||
pyproject.dependencies[o]
|
||||
@ -173,10 +183,7 @@ def env_bootstrap(
|
||||
bootstrap_settings.python_path,
|
||||
'-m',
|
||||
'uv', 'pip', 'install',
|
||||
*sum([
|
||||
['-f', str(o),]
|
||||
for o in pip_find_links
|
||||
], []),
|
||||
*pip_find_links_args,
|
||||
# '-f', str(pathlib.Path(__file__).parent / 'deps' / 'dist'),
|
||||
'--offline',
|
||||
*early_dependencies,
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = 'online.fxreader.pr34'
|
||||
version = '0.1.4.9'
|
||||
version = '0.1.4.12'
|
||||
|
||||
dependencies = [
|
||||
#"-r requirements.txt",
|
||||
|
Loading…
Reference in New Issue
Block a user