Skip to content

v1.0.24

Compare
Choose a tag to compare
@tonybaloney tonybaloney released this 13 Jan 05:20
· 5 commits to main since this release

What's Changed

CSnakes now has the ability to install packages using uv instead of pip, which is significantly faster and improves app startup times.

Installing dependencies with uv

uv is an alternative to pip that can also install requirements from a file like requirements.txt or pyproject.toml. UV has a major benefit in a 10-100x speedup over pip, so your CSnakes applications will be faster to start.

To use uv to install packages:

...
services
    .WithPython()
    .WithVirtualEnvironment(Path.Join(home, ".venv"))
    .WithUvInstaller("requirements.txt"); // Optional - give the name of the requirements file, or pyproject.toml

Some other important notes about this implementation.

  • Only uses uv to install packages and does not use uv to create projects or virtual environments.
  • Must be used with WithVirtualEnvironment(), as pip requires a virtual environment to install packages into.
  • Will use the UV_CACHE_DIR environment variable to cache the packages in a directory if set.
  • Will disable the cache if the UV_NO_CACHE environment variable is set.

Features

Bug Fixes

  • Fix RedistributableLocator install when special folder is missing by @atifaziz in #329

Other Updates

  • Reduce logging noise and move pip/env output to debug logs by @tonybaloney in #325
  • Reuse computed installation lock file path by @atifaziz in #328

Full Changelog: v1.0.23...v1.0.24