diff --git a/python/meson.build b/python/meson.build index e45208e..8618f44 100644 --- a/python/meson.build +++ b/python/meson.build @@ -5,7 +5,7 @@ project( ).stdout().strip('\n'), # 'online.fxreader.uv', # ['c', 'cpp'], - version: '0.1.5.39', + version: '0.1.5.40', # default_options: [ # 'cpp_std=c++23', # # 'prefer_static=true', diff --git a/python/online/fxreader/pr34/commands_typed/cli_bootstrap.py b/python/online/fxreader/pr34/commands_typed/cli_bootstrap.py index 7a95032..c1b4374 100644 --- a/python/online/fxreader/pr34/commands_typed/cli_bootstrap.py +++ b/python/online/fxreader/pr34/commands_typed/cli_bootstrap.py @@ -315,6 +315,7 @@ def pyproject_load( @dataclasses.dataclass class BootstrapSettings: env_path: pathlib.Path + whl_cache_path: pathlib.Path python_path: pathlib.Path base_dir: pathlib.Path python_version: Optional[str] = dataclasses.field( @@ -351,11 +352,14 @@ class BootstrapSettings: else: env_path = base_dir / '.venv' + whl_cache_path = env_path.parent / '.venv-whl-cache' + python_path = env_path / 'bin' / 'python3' return cls( base_dir=base_dir, env_path=env_path, + whl_cache_path=whl_cache_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( [ 'uv', *[o for o in bootstrap_settings.uv_args if not o in ['-U', '--upgrade']], 'venv', *venv_python_version, - *pip_find_links_args, + *cache_find_links_args, # '--seed', str(bootstrap_settings.env_path), ] @@ -523,7 +547,8 @@ def env_bootstrap( 'pip', 'install', *uv_python_version, - *pip_find_links_args, + *cache_find_links_args, + # *pip_find_links_args, '-p', bootstrap_settings.python_path, '--require-hashes', diff --git a/releases/whl/online_fxreader_pr34-0.1.5.40-py3-none-any.whl b/releases/whl/online_fxreader_pr34-0.1.5.40-py3-none-any.whl new file mode 100644 index 0000000..7aeca1e --- /dev/null +++ b/releases/whl/online_fxreader_pr34-0.1.5.40-py3-none-any.whl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a43f4743a00411371d52197d82d7573e9eb34b8a54a343398f9af1b267d8a215 +size 76224