# pychub-poetry-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 poetry.
## Prerequisites
You should already have a `pyproject.toml` file that builds a wheel of your
project with the poetry build backend. Once you have completed that, you can
continue by adding the `pychub-poetry-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
Amend or add the plugin to the `[tool.poetry.requires-plugins` section to let
poetry know about the plugin and its version:
```toml
[tool.poetry.requires-plugins]
pychub-poetry-plugin = "^0.1.0"
```
### 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 = "poetry"
```
### Plugin Execution
Once you have configured the plugin, you can run `poetry 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-poetry-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/d1/8c/3fc8a81a81721f9a9ec6e250c3bb690ccb97a2ddefe2ae0aae18d734b0d3/pychub_poetry_plugin-1.0.3.tar.gz",
"platform": null,
"description": "# pychub-poetry-plugin\n\nThis `pychub` plugin is part of the `pychub-build-plugins` project. If you are\nhere, you should already be familiar with `pychub`. If not, please read the\n`pychub` documentation. You can find it on\n[github](https://github.com/Steve973/pychub), or on\n[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 poetry.\n\n## Prerequisites\n\nYou should already have a `pyproject.toml` file that builds a wheel of your\nproject with the poetry build backend. Once you have completed that, you can\ncontinue by adding the `pychub-poetry-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\nAmend or add the plugin to the `[tool.poetry.requires-plugins` section to let\npoetry know about the plugin and its version:\n\n```toml\n[tool.poetry.requires-plugins]\npychub-poetry-plugin = \"^0.1.0\"\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 = \"poetry\"\n```\n\n### Plugin Execution\n\nOnce you have configured the plugin, you can run `poetry 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": "Poetry 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": "cdc4a55f98172b46f34a5c3f15625ce9128970f99f31c34bbaff51afc65cc8d9",
"md5": "332782001498b21948c10dda71728218",
"sha256": "bf4f141d5c7a8240acb5d6726a330beb7450550f4e3f3c2c38f5622786d3a061"
},
"downloads": -1,
"filename": "pychub_poetry_plugin-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "332782001498b21948c10dda71728218",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 3215,
"upload_time": "2025-09-08T23:46:48",
"upload_time_iso_8601": "2025-09-08T23:46:48.127433Z",
"url": "https://files.pythonhosted.org/packages/cd/c4/a55f98172b46f34a5c3f15625ce9128970f99f31c34bbaff51afc65cc8d9/pychub_poetry_plugin-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d18c3fc8a81a81721f9a9ec6e250c3bb690ccb97a2ddefe2ae0aae18d734b0d3",
"md5": "f225898de0bb73f15feb0e5fcb95e240",
"sha256": "21fdb4eba00215b717187b5c104a849e3f94d9a38bc380055cf066e51a2a3db2"
},
"downloads": -1,
"filename": "pychub_poetry_plugin-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "f225898de0bb73f15feb0e5fcb95e240",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 2354,
"upload_time": "2025-09-08T23:46:51",
"upload_time_iso_8601": "2025-09-08T23:46:51.551314Z",
"url": "https://files.pythonhosted.org/packages/d1/8c/3fc8a81a81721f9a9ec6e250c3bb690ccb97a2ddefe2ae0aae18d734b0d3/pychub_poetry_plugin-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-08 23:46:51",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pychub-poetry-plugin"
}