In uv (the Python package manager), the uv.lock file can become verbose, especially with the wheels field, which lists all the built wheel metadata for each dependency. If you want to generate a uv.lock file without the wheels field being overly detailed, you have a few options:
--no-wheels Flag (if available)Check if your version of uv supports the --no-wheels flag for the lock command. This would prevent uv from including wheel metadata in the lockfile.
bashuv lock --no-wheels
If this flag doesn't exist, proceed to the next options.
After generating the lockfile, you can manually remove or trim the wheels field. However, this is not recommended for production, as it may break reproducibility.
If uv allows customization of the lockfile format (e.g., via configuration), you might be able to exclude the wheels field. Check the uv documentation for any such options.
After generating the lockfile, run a script to strip or summarize the wheels field. For example, using jq (if the lockfile is JSON-based):
bashjq 'del(.wheels)' uv.lock > uv.lock.trimmed
Adjust the script based on the actual structure of your lockfile.
Look in uv's configuration (e.g., pyproject.toml or uv.toml) for options to control lockfile verbosity. For example:
toml[tool.uv] lockfile-style = "minimal" # Hypothetical, check actual docs
If uv supports alternative lockfile formats (e.g., poetry.lock-style), you might switch to a less verbose format.
wheels Field Verbose?The wheels field includes metadata like hashes, URLs, and platform-specific builds for each dependency. This ensures reproducibility but can bloat the file. If you don't need strict reproducibility (e.g., for development), trimming this field may be acceptable.
Let me know if you want help checking your uv version or exploring its configuration options!
Vibe can make mistakes. Check answers. Learn more