jupyterlite-pyodide-lock-uv#
A uv locker strategy for jupyterlite-pyodide-lock.
Lockers#
UvLocker#
Locker implementation jupyterlite-pyodide-lock-uv.
- class jupyterlite_pyodide_lock_uv.locker.UvLocker(**kwargs) None[source]#
Bases:
BaseLockerA locker that uses
uv pip compile.- Parameters:
kwargs (
Any)
Create a configurable given a config config.
Parameters#
- configConfig
If this is empty, default values are used. If config is a
Configinstance, it will be used to configure the instance.- parentConfigurable instance, optional
The parent Configurable instance of this object.
Notes#
Subclasses of Configurable must call the
__init__()method ofConfigurablebefore doing anything else and usingsuper():class MyConfigurable(Configurable): def __init__(self, config=None): super(MyConfigurable, self).__init__(config=config) # Then any other code you need to finish initialization.
This ensures that instances will be configured properly.
- param kwargs:
- type kwargs:
- build_one_constraint_from_pyodide_lock(pkg, requirements) dict[str, str][source]#
Build a PEP-508
@constraint from apyodide-lock.jsonpackage.
- build_one_package_requirement(wheel) dict[str, str][source]#
Build a
package @ file://urlspec for an on-disk wheel.
- build_pyodide_lock() None[source]#
Update
{out_dir}/pyodide-lock/pyodide-lock.jsonfrom wheels.- Return type:
- build_tmp_pyodide_lock(old_lockfile, wheels) dict[str, Any][source]#
Use local wheels to make a patched
pyodide-lock.json.
- extra_uv_pip_compile_args c.UvLocker.extra_uv_pip_compile_args = TypedTuple()#
extra arguments to
uv pip compile, such as--default-index
- fix_one_tmp_pyodide_lock_package(root_posix, lock_dir, package, found_wheels) None[source]#
Update a
pyodide-lockURL for deployment.
- pyodide_cdn_url c.UvLocker.pyodide_cdn_url = Unicode('https://cdn.jsdelivr.net/pyodide/v0.27.6/full')#
remote URL for the version of a full pyodide distribution; defaults to the version provided by
jupyterlite_pyodide_kernel
- timeout c.UvLocker.timeout = Int(0)#
seconds to wait for a solve
- uv_bin c.UvLocker.uv_bin = Unicode('')#
a custom executable for
uv
- uv_pip_compile_args c.UvLocker.uv_pip_compile_args = TypedTuple()#
arguments to
uv pip compile
- uv_platform c.UvLocker.uv_platform = Unicode('wasm32-pyodide2024')#
the
uvpython platform