venv-patcher Logo
0.2.0-5-g4789c9b

Introduction

  • About venv-patcher
    • What problem does it solve?
    • How it works, in short
    • Why use it?
    • Next steps
  • Install venv-patcher
    • Requirements
    • Install it into the venv you want to patch
    • Check the install
    • From source
    • Next steps

Quickstart

  • venv-patcher in 5 minutes
    • 1. Make a venv
    • 2. Write a patch
    • 3. Write the patches file
    • 4. Apply it
    • 5. See what is patched
    • 6. Apply again
    • 7. Undo it
    • Next steps
  • Everyday tasks
    • Apply your patches
    • Apply the patches of one package
    • See what is patched
    • Undo all patches
    • Undo the patches of one package
    • Change a patch and apply it again
    • Look at a patched package
    • Upgrade a patched package

Concepts

  • Glossary
  • How it works
    • The picture
    • Where things live
    • Apply
    • Why the commits are always the same
    • List
    • Reset
    • Apply with --force
    • A package’s life
    • What it does not do
  • Compared to other ways
    • At a glance
    • Fork
    • Monkey patch
    • Vendoring
    • Edit by hand
    • When venv-patcher is not the right tool

venv-patcher command

  • Overview and common options
    • Commands
    • Getting help
    • Options for all commands
    • The venv it works on
    • Output
    • Exit status
  • venv-patcher apply
    • What it does
    • Options
    • Examples
    • Running it again
    • A package that changed
    • A package that is not installed
    • --force
    • When a patch fails
    • Notes
    • See also
  • venv-patcher list
    • What it does
    • Options
    • Example
    • Notes
    • See also
  • venv-patcher reset
    • What it does
    • Options
    • Examples
    • Notes
    • A package that changed
    • See also

Configuration

  • The patches file
    • YAML
    • TOML
    • Top level
    • Fields of an entry
      • package
      • path
      • sha256sum
      • apply-command
      • author
      • email
      • date
      • comments
    • Several files
  • The manifest
    • Example
    • Fields of a package
    • Fields of a patch result
    • How it is used

Guides

  • Write a patch
    • 1. Copy the package
    • 2. Change it
    • 3. Save it
    • 4. Add it to the patches file
    • 5. Try it
    • In the package folder
    • A plain diff
    • Many patches for one package
    • See also
  • Use a patch from upstream
    • The problem: other paths
    • Get the patch
    • Strip the front of the paths
    • Leave out other files
    • Check that it fits
  • Pin a patch with sha256sum
    • Pin it
    • When the file changes
    • When to pin
    • Without a pin
  • Work on a patch
    • The loop
    • Edit in the package, then save the patch
    • When it is done
  • Many packages and files
    • One file, many packages
    • Many files
    • Only some packages
    • A package that is not always installed
  • Upgrade a patched package
    • How it notices
    • Apply the patches again
    • Without --force
    • Reset
    • A new venv works too
    • Uninstall
  • Use it in CI
    • GitHub Actions
    • With uv
    • git is needed
    • Fail the build on a bad patch
    • Pin your patches

Architecture

  • Architecture
    • Goals
    • How a command runs
    • Modules
      • cli.py
      • core.py
    • Key decisions
      • git, not a copy
      • Pinned identity
      • git runs without maintenance
      • The manifest lives in the venv
      • Save after each step
      • TOML only on Python 3.11 or newer
      • Notice changes from pip
      • Functions of the right size
    • Git calls
  • Git call diagrams
    • apply
    • list
    • reset

Contributing

  • Development
    • Setup
    • Making changes
    • Tests
    • Checks
    • Adding a command
    • Commit messages
    • Reporting bugs
  • Documentation
    • Build
    • Where to write what
    • Layout
    • Writing style
    • Markdown
    • Publishing
venv-patcher
  • Search


© Copyright Thorsten Klein.

Built with Sphinx using a theme provided by Read the Docs.