# pychub-hatch-plugin
This pychub plugin is part of the pychub-build-plugins project. If you are here,
you should already be familiar with pychub. If not, please read the pychub
documentation. You can find it on [github](https://github.com/Steve973/pychub),
or on [pypi](https://pypi.org/project/pychub/). The information located in those
locations will describe the operation of pychub. This document will describe
how to use pychub in a `pyproject.toml` file when building with hatch.
## Prerequisites
You should already have a `pyproject.toml` file that builds a wheel of your
project with the hatch build backend. Once you have completed that, you can
continue by adding the `pychub-hatch-plugin` to your `pyproject.toml` file.
## Using the Plugin
Usage of the plugin is straightforward, and only requires the addition of the
plugin to your `pyproject.toml` file, and the standard `pychub` configuration.
### Adding the Plugin To Your `pyproject.toml` File
Add the build hooks header to your `pyproject.toml` file so that the pychub
plugin can operate on the wheel building phase:
```toml
[tool.hatch.build.targets.wheel.hooks.pychub]
```
### Configuring the Plugin
Add the `pychub` configuration to your `pyproject.toml` file according to the
`pychub` documentation. Here is an example:
```toml
[tool.pychub.package]
name = "test-proj"
version = "0.0.1"
wheel = "dist/test_pkg-0.0.1-py3-none-any.whl"
includes = [
"includes/README.md::docs/",
"includes/test.cfg::conf/",
"includes/info.txt::etc/other.txt",
"includes/test.txt"
]
[tool.pychub.package.scripts]
pre = ["scripts/pre_script.sh"]
post = ["scripts/post_script.sh"]
[tool.pychub.package.metadata]
maintainer = "you@example.com"
test = "hatch"
```
### Plugin Execution
Once you have configured the plugin, you can run `hatch build` and the plugin
will execute. Your `dist` directory will contain the wheel and the `pychub`
file.
Raw data
{
"_id": null,
"home_page": null,
"name": "pychub-hatch-plugin",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "bundle, chub, executable, package, packaging, zipapp",
"author": "Steve Storck",
"author_email": "steve973@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/5d/35/9da446a96f71fd125a083e3b4186f17c58952c80052f782aa630e73ee9b0/pychub_hatch_plugin-1.0.3.tar.gz",
"platform": null,
"description": "# pychub-hatch-plugin\n\nThis pychub plugin is part of the pychub-build-plugins project. If you are here,\nyou should already be familiar with pychub. If not, please read the pychub\ndocumentation. You can find it on [github](https://github.com/Steve973/pychub),\nor on [pypi](https://pypi.org/project/pychub/). The information located in those\nlocations will describe the operation of pychub. This document will describe\nhow to use pychub in a `pyproject.toml` file when building with hatch.\n\n## Prerequisites\n\nYou should already have a `pyproject.toml` file that builds a wheel of your\nproject with the hatch build backend. Once you have completed that, you can\ncontinue by adding the `pychub-hatch-plugin` to your `pyproject.toml` file.\n\n## Using the Plugin\n\nUsage of the plugin is straightforward, and only requires the addition of the\nplugin to your `pyproject.toml` file, and the standard `pychub` configuration.\n\n### Adding the Plugin To Your `pyproject.toml` File\n\nAdd the build hooks header to your `pyproject.toml` file so that the pychub\nplugin can operate on the wheel building phase:\n\n```toml\n[tool.hatch.build.targets.wheel.hooks.pychub]\n```\n\n### Configuring the Plugin\n\nAdd the `pychub` configuration to your `pyproject.toml` file according to the\n`pychub` documentation. Here is an example:\n\n```toml\n[tool.pychub.package]\nname = \"test-proj\"\nversion = \"0.0.1\"\nwheel = \"dist/test_pkg-0.0.1-py3-none-any.whl\"\nincludes = [\n \"includes/README.md::docs/\",\n \"includes/test.cfg::conf/\",\n \"includes/info.txt::etc/other.txt\",\n \"includes/test.txt\"\n]\n\n[tool.pychub.package.scripts]\npre = [\"scripts/pre_script.sh\"]\npost = [\"scripts/post_script.sh\"]\n\n[tool.pychub.package.metadata]\nmaintainer = \"you@example.com\"\ntest = \"hatch\"\n```\n\n### Plugin Execution\n\nOnce you have configured the plugin, you can run `hatch build` and the plugin\nwill execute. Your `dist` directory will contain the wheel and the `pychub`\nfile.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Hatch build plugin for pychub",
"version": "1.0.3",
"project_urls": null,
"split_keywords": [
"bundle",
" chub",
" executable",
" package",
" packaging",
" zipapp"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "35afaf67dfc19b99856f34fd0db1fdb25d684c104e45d9f26ea84b8a7967ac14",
"md5": "867cbb73447edd0c87a45e921f142b79",
"sha256": "acfd741c399c52cfcea5f5ac1a1e4825389c94a823421cfb49606ea635bbcfb3"
},
"downloads": -1,
"filename": "pychub_hatch_plugin-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "867cbb73447edd0c87a45e921f142b79",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 3307,
"upload_time": "2025-09-08T23:46:41",
"upload_time_iso_8601": "2025-09-08T23:46:41.941831Z",
"url": "https://files.pythonhosted.org/packages/35/af/af67dfc19b99856f34fd0db1fdb25d684c104e45d9f26ea84b8a7967ac14/pychub_hatch_plugin-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5d359da446a96f71fd125a083e3b4186f17c58952c80052f782aa630e73ee9b0",
"md5": "970ef2d87a36839db3e13e93f641cf82",
"sha256": "b1c00767113f377bbe38083f86883c87cc3302b0cec38ea90dfd7bc8aa4ff1d8"
},
"downloads": -1,
"filename": "pychub_hatch_plugin-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "970ef2d87a36839db3e13e93f641cf82",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 2295,
"upload_time": "2025-09-08T23:46:49",
"upload_time_iso_8601": "2025-09-08T23:46:49.177759Z",
"url": "https://files.pythonhosted.org/packages/5d/35/9da446a96f71fd125a083e3b4186f17c58952c80052f782aa630e73ee9b0/pychub_hatch_plugin-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-08 23:46:49",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pychub-hatch-plugin"
}