[+] update pr34
1. update cli_boostrap.py example;
1.1. allow to force whl_cache update;
not reset;
1.2. log more command calls, before executing them;
2. update oom_firefox,
to produce some logs;
2.1. still not practical solution,
since tabs crash very fast,
and no integration with the browser,
to say extensions killing,
which happens still for some reason;
3. reuse pr34_logging.setup();
This commit is contained in:
parent
d68670f624
commit
79a1296281
@ -5,7 +5,7 @@ project(
|
||||
).stdout().strip('\n'),
|
||||
# 'online.fxreader.uv',
|
||||
# ['c', 'cpp'],
|
||||
version: '0.1.5.62',
|
||||
version: '0.1.5.65',
|
||||
# default_options: [
|
||||
# 'cpp_std=c++23',
|
||||
# # 'prefer_static=true',
|
||||
|
||||
@ -358,6 +358,12 @@ class BootstrapSettings:
|
||||
'--offline -U',
|
||||
).split(),
|
||||
)
|
||||
whl_cache_update: Optional[bool] = dataclasses.field(
|
||||
default_factory=lambda: os.environ.get(
|
||||
'WHL_CACHE_UPDATE', json.dumps(False)
|
||||
)
|
||||
in [json.dumps(True)]
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def get(
|
||||
@ -520,37 +526,44 @@ def env_bootstrap(
|
||||
f.write('\n'.join(requirements_in))
|
||||
f.flush()
|
||||
|
||||
subprocess.check_call(
|
||||
[
|
||||
'uv',
|
||||
'pip',
|
||||
'compile',
|
||||
*uv_python_version,
|
||||
'--generate-hashes',
|
||||
*pip_find_links_args,
|
||||
# '-p',
|
||||
# bootstrap_settings.python_path,
|
||||
*bootstrap_settings.uv_args,
|
||||
'-o',
|
||||
str(requirements_path),
|
||||
f.name,
|
||||
]
|
||||
)
|
||||
|
||||
if not bootstrap_settings.env_path.exists():
|
||||
subprocess.check_call(
|
||||
[
|
||||
cmd = [
|
||||
'uv',
|
||||
'pip',
|
||||
'download',
|
||||
'--only-binary=:all:',
|
||||
'compile',
|
||||
*uv_python_version,
|
||||
'--generate-hashes',
|
||||
*pip_find_links_args,
|
||||
'-r',
|
||||
# '-p',
|
||||
# bootstrap_settings.python_path,
|
||||
*bootstrap_settings.uv_args,
|
||||
'-o',
|
||||
str(requirements_path),
|
||||
'-d',
|
||||
str(bootstrap_settings.whl_cache_path),
|
||||
f.name,
|
||||
]
|
||||
)
|
||||
|
||||
logger.info(dict(cmd=cmd))
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
# if not bootstrap_settings.env_path.exists():
|
||||
if (
|
||||
not bootstrap_settings.whl_cache_path.exists()
|
||||
or bootstrap_settings.whl_cache_update
|
||||
):
|
||||
cmd = [
|
||||
'pip',
|
||||
'download',
|
||||
'--only-binary=:all:',
|
||||
*uv_python_version,
|
||||
*pip_find_links_args,
|
||||
'-r',
|
||||
str(requirements_path),
|
||||
'-d',
|
||||
str(bootstrap_settings.whl_cache_path),
|
||||
]
|
||||
|
||||
logger.info(dict(cmd=cmd))
|
||||
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
cache_find_links_args = (
|
||||
'-f',
|
||||
@ -563,7 +576,12 @@ def env_bootstrap(
|
||||
*[
|
||||
o
|
||||
for o in bootstrap_settings.uv_args
|
||||
if not o in ['-U', '--upgrade']
|
||||
if not o
|
||||
in [
|
||||
'-U',
|
||||
'--upgrade',
|
||||
'--no-index',
|
||||
]
|
||||
],
|
||||
'venv',
|
||||
*venv_python_version,
|
||||
@ -573,22 +591,24 @@ def env_bootstrap(
|
||||
]
|
||||
)
|
||||
|
||||
subprocess.check_call(
|
||||
[
|
||||
'uv',
|
||||
'pip',
|
||||
'install',
|
||||
*uv_python_version,
|
||||
*cache_find_links_args,
|
||||
# *pip_find_links_args,
|
||||
'-p',
|
||||
bootstrap_settings.python_path,
|
||||
'--require-hashes',
|
||||
*bootstrap_settings.uv_args,
|
||||
'-r',
|
||||
str(requirements_path),
|
||||
]
|
||||
)
|
||||
cmd = [
|
||||
'uv',
|
||||
'pip',
|
||||
'install',
|
||||
*uv_python_version,
|
||||
*cache_find_links_args,
|
||||
# *pip_find_links_args,
|
||||
'-p',
|
||||
bootstrap_settings.python_path,
|
||||
'--require-hashes',
|
||||
*bootstrap_settings.uv_args,
|
||||
'-r',
|
||||
str(requirements_path),
|
||||
]
|
||||
|
||||
logger.info(dict(cmd=cmd))
|
||||
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
if bootstrap_settings.pip_check_conflicts:
|
||||
subprocess.check_call(
|
||||
|
||||
@ -12,6 +12,8 @@ import textwrap
|
||||
import optparse
|
||||
import traceback
|
||||
|
||||
from . import logging as pr34_logging
|
||||
|
||||
from typing import (
|
||||
Any,
|
||||
Optional,
|
||||
@ -60,7 +62,8 @@ def get_info(
|
||||
|
||||
|
||||
def run(argv: list[str]):
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
# logging.basicConfig(level=logging.INFO)
|
||||
pr34_logging.setup()
|
||||
|
||||
assert isinstance(argv, list) and all([isinstance(o, str) for o in argv])
|
||||
|
||||
|
||||
@ -417,6 +417,19 @@ def main():
|
||||
|
||||
if total > limit:
|
||||
to_free = total - kill_to
|
||||
|
||||
logger.info(
|
||||
dict(
|
||||
total=total,
|
||||
limit=limit,
|
||||
kill_to=kill_to,
|
||||
to_free=to_free,
|
||||
low_priority_pids=low_priority_pids,
|
||||
worker_regex=args.worker_regex,
|
||||
main_regex=args.main_regex,
|
||||
)
|
||||
)
|
||||
|
||||
killed, freed = kill_prioritized(
|
||||
procs,
|
||||
to_free,
|
||||
|
||||
BIN
releases/whl/online_fxreader_pr34-0.1.5.63-py3-none-any.whl
(Stored with Git LFS)
Normal file
BIN
releases/whl/online_fxreader_pr34-0.1.5.63-py3-none-any.whl
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
releases/whl/online_fxreader_pr34-0.1.5.64-py3-none-any.whl
(Stored with Git LFS)
Normal file
BIN
releases/whl/online_fxreader_pr34-0.1.5.64-py3-none-any.whl
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
releases/whl/online_fxreader_pr34-0.1.5.65-py3-none-any.whl
(Stored with Git LFS)
Normal file
BIN
releases/whl/online_fxreader_pr34-0.1.5.65-py3-none-any.whl
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user