makepatch
Hatchling build hook that helps developers freely modify and build Python
packages through patches, like pnpm patch.
[!WARN] This package was developed for personal use and is still unstable and poorly developed. Only confirmed to work with
uv. PRs are welcome.
Usage
[!IMPORTANT] Patching installed packages is not yet supported. To patch a package, you must create a separate project (recommend using workspace).
To include patched packages automatically during the build, you need to add
makepatch to build-system and register the hook as follows:
[build-system]
requires = ["hatchling", "makepatch"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.makepatch.options]
# Add options here
- To initialize the patch development environment, run the following command:
uv run apply-patches
This will create a patched source inwork/patched. - To create a patch file with modifications to
work/patched, run the following command:
uv run rebuild-patches
Configuration
[tool.hatch.build.hooks.makepatch.options]
module-source = "path of the actual package relative to `work/sources` (e.g., `src/mcp`)"
excludes = [
# Files to exclude within `module-source`
# DO NOT delete files from `work/patched`, you must exclude it from there
]
dev-excludes = [
# Files to exclude when copied from `work/sources` to `work/patched`
# does not affect build results and only for reducing copy time and storage usage.
# will be changed to only copy `module-source` in the future.
]
Release files for makepatch 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| makepatch-0.2.8.tar.gz | 20.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| makepatch-0.2.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.2 kB
Release files / makepatch-0.2.8.tar.gz
| Download URL | makepatch-0.2.8.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfb4e4317c6854f4d734a9c5a41b92c19363a220c8295e249ab76c06c0fbaaaa
|
|
BLAKE2b-256 checksum How to use checksums |
e465eb1b0fce3277fc8bda7375e20c8adb917b903043f51ad0766155bde443f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / makepatch-0.2.8-py3-none-any.whl
| Download URL | makepatch-0.2.8-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0e56a96e415a1aa011a7e6d65297e8b37503c208b1948e0f3c2730a3c195998
|
|
BLAKE2b-256 checksum How to use checksums |
ba6ff90faa8a88d616c56fc846ce752ec098941e65c1bada19f15b1bfcd93baa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|