Skip to main content

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 in work/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.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for makepatch 0.2.6
File Size Uploaded
makepatch-0.2.6.tar.gz 20.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for makepatch 0.2.6
File Interpreter ABI Platform
makepatch-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 30.2 kB

Release files / makepatch-0.2.6.tar.gz

Download URL makepatch-0.2.6.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
448d2f0af792d632582dbedb993cb6467d0ddf65a38ec8e23be5c1d157a907c7
BLAKE2b-256 checksum
How to use checksums
4c8801d17c3b24d781f3b0e8393c7daa734f6d70e7564afe57519c9fb0d40b7a
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.6-py3-none-any.whl

Download URL makepatch-0.2.6-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18eeed4830bc6158d347f3c908cf8114812e42582c736d2c4cdbeee80197893f
BLAKE2b-256 checksum
How to use checksums
5b5e02a2089e05563eace121a84276685bfc58e335b14b030c4ce89a9462131c
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 history Release notifications | RSS feed

0.2.8

2 release files

0.2.7

2 release files

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page