Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

patch-package

PyPI - Python Version PyPI

patch-package is a Python library to automatically create and apply patches from changes made in installed packages. It is heavily inspired by patch-package which is the equivalent for Node packages.

Features

  • Compatible with Python 3.8+
  • Automatic code change detection between installed package and package source from pip
  • Prevent patching when version or code are mismatching
  • Automatic matching between import names and package names (e.g. yaml -> PyYAML) and fuzzy matching (e.g. request -> requests)

Usage

Install the library from PyPI

pip install patch-package

Make a change in one of your installed package and then generate the corresponding patch

patch-package <package-name>

Then when reinstalling the package you can apply back your patches

patch-package

All patches are contained in the patches/ folder so it can be commited to git and reapply whenever you want

Development

Install the library in editable mode

uv pip install -e .

Do whatever modifications you want and file a pull request, thanks !

About

Python library to automatically create and apply patches from changes made in installed packages.

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages