[+] update pr34
1. update cli_bootstrap
to explicitly fetch whl-cache;
This commit is contained in:
parent
7805bad8e7
commit
1377fdd9ff
@ -5,7 +5,7 @@ project(
|
|||||||
).stdout().strip('\n'),
|
).stdout().strip('\n'),
|
||||||
# 'online.fxreader.uv',
|
# 'online.fxreader.uv',
|
||||||
# ['c', 'cpp'],
|
# ['c', 'cpp'],
|
||||||
version: '0.1.5.39',
|
version: '0.1.5.40',
|
||||||
# default_options: [
|
# default_options: [
|
||||||
# 'cpp_std=c++23',
|
# 'cpp_std=c++23',
|
||||||
# # 'prefer_static=true',
|
# # 'prefer_static=true',
|
||||||
|
|||||||
@ -315,6 +315,7 @@ def pyproject_load(
|
|||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
class BootstrapSettings:
|
class BootstrapSettings:
|
||||||
env_path: pathlib.Path
|
env_path: pathlib.Path
|
||||||
|
whl_cache_path: pathlib.Path
|
||||||
python_path: pathlib.Path
|
python_path: pathlib.Path
|
||||||
base_dir: pathlib.Path
|
base_dir: pathlib.Path
|
||||||
python_version: Optional[str] = dataclasses.field(
|
python_version: Optional[str] = dataclasses.field(
|
||||||
@ -351,11 +352,14 @@ class BootstrapSettings:
|
|||||||
else:
|
else:
|
||||||
env_path = base_dir / '.venv'
|
env_path = base_dir / '.venv'
|
||||||
|
|
||||||
|
whl_cache_path = env_path.parent / '.venv-whl-cache'
|
||||||
|
|
||||||
python_path = env_path / 'bin' / 'python3'
|
python_path = env_path / 'bin' / 'python3'
|
||||||
|
|
||||||
return cls(
|
return cls(
|
||||||
base_dir=base_dir,
|
base_dir=base_dir,
|
||||||
env_path=env_path,
|
env_path=env_path,
|
||||||
|
whl_cache_path=whl_cache_path,
|
||||||
python_path=python_path,
|
python_path=python_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -505,13 +509,33 @@ def env_bootstrap(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not bootstrap_settings.env_path.exists():
|
||||||
|
subprocess.check_call(
|
||||||
|
[
|
||||||
|
'pip',
|
||||||
|
'download',
|
||||||
|
'--only-binary=:all:',
|
||||||
|
*uv_python_version,
|
||||||
|
*pip_find_links_args,
|
||||||
|
'-r',
|
||||||
|
str(requirements_path),
|
||||||
|
'-d',
|
||||||
|
str(bootstrap_settings.whl_cache_path),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
cache_find_links_args = (
|
||||||
|
'-f',
|
||||||
|
str(bootstrap_settings.whl_cache_path),
|
||||||
|
)
|
||||||
|
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
[
|
[
|
||||||
'uv',
|
'uv',
|
||||||
*[o for o in bootstrap_settings.uv_args if not o in ['-U', '--upgrade']],
|
*[o for o in bootstrap_settings.uv_args if not o in ['-U', '--upgrade']],
|
||||||
'venv',
|
'venv',
|
||||||
*venv_python_version,
|
*venv_python_version,
|
||||||
*pip_find_links_args,
|
*cache_find_links_args,
|
||||||
# '--seed',
|
# '--seed',
|
||||||
str(bootstrap_settings.env_path),
|
str(bootstrap_settings.env_path),
|
||||||
]
|
]
|
||||||
@ -523,7 +547,8 @@ def env_bootstrap(
|
|||||||
'pip',
|
'pip',
|
||||||
'install',
|
'install',
|
||||||
*uv_python_version,
|
*uv_python_version,
|
||||||
*pip_find_links_args,
|
*cache_find_links_args,
|
||||||
|
# *pip_find_links_args,
|
||||||
'-p',
|
'-p',
|
||||||
bootstrap_settings.python_path,
|
bootstrap_settings.python_path,
|
||||||
'--require-hashes',
|
'--require-hashes',
|
||||||
|
|||||||
BIN
releases/whl/online_fxreader_pr34-0.1.5.40-py3-none-any.whl
(Stored with Git LFS)
Normal file
BIN
releases/whl/online_fxreader_pr34-0.1.5.40-py3-none-any.whl
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user