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.7
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.7.tar.gz | 20.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| makepatch-0.2.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.2 kB
Release files / makepatch-0.2.7.tar.gz
| Download URL | makepatch-0.2.7.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a97b9ba5eaf61c2bd538cf0e6a7daa6d601a34acb8e943612e1d328e4cfa411a
|
|
BLAKE2b-256 checksum How to use checksums |
95b60435aa8347bc888655483deae7c8544f4740b3d07a8a071b101424a64bea
|
| 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.7-py3-none-any.whl
| Download URL | makepatch-0.2.7-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b51a6b155bb75d611c4461b7da0b834f35f7bc740027d5e8a2b0f5885fc10cd
|
|
BLAKE2b-256 checksum How to use checksums |
8322a543b14d5288a5d14ca303d6c558267327f704e28c50c6c3c939935530e9
|
| 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}
|