Skip to content

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

License

Notifications You must be signed in to change notification settings

Cabanon/patch-package

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 2.7 and Python 3.5+
  • 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

Make sure you have pyenv installed.

Install the tox library

pip install tox

Run tests

tox

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages