Name | hatch-mypyc JSON |
Version |
0.15.0
JSON |
| download |
home_page | |
Summary | Hatch build hook plugin for Mypyc |
upload_time | 2023-01-06 05:44:18 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | |
keywords |
build
hatch
mypy
mypyc
plugin
typing
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# hatch-mypyc
| | |
| --- | --- |
| CI/CD | [![CI - Test](https://github.com/ofek/hatch-mypyc/actions/workflows/test.yml/badge.svg)](https://github.com/ofek/hatch-mypyc/actions/workflows/test.yml) [![CD - Build](https://github.com/ofek/hatch-mypyc/actions/workflows/build.yml/badge.svg)](https://github.com/ofek/hatch-mypyc/actions/workflows/build.yml) |
| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hatch-mypyc.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hatch-mypyc/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-mypyc.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hatch-mypyc/) |
| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ofek?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/ofek) |
-----
This provides a [build hook](https://hatch.pypa.io/latest/config/build/#build-hooks) plugin for [Hatch](https://github.com/pypa/hatch) that compiles code with [Mypyc](https://github.com/mypyc/mypyc).
**Table of Contents**
- [Configuration](#configuration)
- [File selection](#file-selection)
- [Mypy arguments](#mypy-arguments)
- [Options](#options)
- [Missing types](#missing-types)
- [License](#license)
## Configuration
The [build hook plugin](https://hatch.pypa.io/latest/plugins/build-hook/) name is `mypyc`.
- ***pyproject.toml***
```toml
[tool.hatch.build.targets.wheel.hooks.mypyc]
dependencies = ["hatch-mypyc"]
```
- ***hatch.toml***
```toml
[build.targets.wheel.hooks.mypyc]
dependencies = ["hatch-mypyc"]
```
### File selection
By default, all files included using the [standard file selection options](https://hatch.pypa.io/latest/config/build/#file-selection) with a `.py` extension will be targeted. You can narrow what files to compile to an even smaller subset with the `include`/`exclude` options, which represent [Git-style glob patterns](https://git-scm.com/docs/gitignore#_pattern_format).
```toml
[build.targets.wheel.hooks.mypyc]
include = ["/src/pkg/server"]
exclude = ["__main__.py"]
```
### Mypy arguments
You can specify extra [Mypy arguments](https://mypy.readthedocs.io/en/stable/command_line.html) with the `mypy-args` option.
```toml
[build.targets.wheel.hooks.mypyc]
mypy-args = [
"--disallow-untyped-defs",
]
```
### Options
You can specify `options` that affect the behavior of [mypycify](https://github.com/python/mypy/blob/v0.930/mypyc/build.py#L429).
```toml
[build.targets.wheel.hooks.mypyc.options]
opt_level = "3"
```
Note:
- the `target_dir` option is used internally and therefore has no effect
## Missing types
If you need more packages at build time in order to successfully type check, you can use the following options where you [configured the plugin](#configuration):
- `dependencies` - add more dependencies alongside `hatch-mypyc`
- `require-runtime-dependencies` - set to `true` to include dependencies defined in the `project.dependencies` array
- `require-runtime-features` - set to an array of named dependency groups that are defined in `project.optional-dependencies`
## License
`hatch-mypyc` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
Raw data
{
"_id": null,
"home_page": "",
"name": "hatch-mypyc",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "build,hatch,mypy,mypyc,plugin,typing",
"author": "",
"author_email": "Ofek Lev <oss@ofek.dev>",
"download_url": "https://files.pythonhosted.org/packages/3e/3c/304fbd935ba016410b6795a71c7c2023bfb97f4fd90a1f1daa90f9a6f5e5/hatch_mypyc-0.15.0.tar.gz",
"platform": null,
"description": "# hatch-mypyc\n\n| | |\n| --- | --- |\n| CI/CD | [![CI - Test](https://github.com/ofek/hatch-mypyc/actions/workflows/test.yml/badge.svg)](https://github.com/ofek/hatch-mypyc/actions/workflows/test.yml) [![CD - Build](https://github.com/ofek/hatch-mypyc/actions/workflows/build.yml/badge.svg)](https://github.com/ofek/hatch-mypyc/actions/workflows/build.yml) |\n| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hatch-mypyc.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hatch-mypyc/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-mypyc.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hatch-mypyc/) |\n| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ofek?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/ofek) |\n\n-----\n\nThis provides a [build hook](https://hatch.pypa.io/latest/config/build/#build-hooks) plugin for [Hatch](https://github.com/pypa/hatch) that compiles code with [Mypyc](https://github.com/mypyc/mypyc).\n\n**Table of Contents**\n\n- [Configuration](#configuration)\n - [File selection](#file-selection)\n - [Mypy arguments](#mypy-arguments)\n - [Options](#options)\n- [Missing types](#missing-types)\n- [License](#license)\n\n## Configuration\n\nThe [build hook plugin](https://hatch.pypa.io/latest/plugins/build-hook/) name is `mypyc`.\n\n- ***pyproject.toml***\n\n ```toml\n [tool.hatch.build.targets.wheel.hooks.mypyc]\n dependencies = [\"hatch-mypyc\"]\n ```\n\n- ***hatch.toml***\n\n ```toml\n [build.targets.wheel.hooks.mypyc]\n dependencies = [\"hatch-mypyc\"]\n ```\n\n### File selection\n\nBy default, all files included using the [standard file selection options](https://hatch.pypa.io/latest/config/build/#file-selection) with a `.py` extension will be targeted. You can narrow what files to compile to an even smaller subset with the `include`/`exclude` options, which represent [Git-style glob patterns](https://git-scm.com/docs/gitignore#_pattern_format).\n\n```toml\n[build.targets.wheel.hooks.mypyc]\ninclude = [\"/src/pkg/server\"]\nexclude = [\"__main__.py\"]\n```\n\n### Mypy arguments\n\nYou can specify extra [Mypy arguments](https://mypy.readthedocs.io/en/stable/command_line.html) with the `mypy-args` option.\n\n```toml\n[build.targets.wheel.hooks.mypyc]\nmypy-args = [\n \"--disallow-untyped-defs\",\n]\n```\n\n### Options\n\nYou can specify `options` that affect the behavior of [mypycify](https://github.com/python/mypy/blob/v0.930/mypyc/build.py#L429).\n\n```toml\n[build.targets.wheel.hooks.mypyc.options]\nopt_level = \"3\"\n```\n\nNote:\n\n- the `target_dir` option is used internally and therefore has no effect\n\n## Missing types\n\nIf you need more packages at build time in order to successfully type check, you can use the following options where you [configured the plugin](#configuration):\n\n- `dependencies` - add more dependencies alongside `hatch-mypyc`\n- `require-runtime-dependencies` - set to `true` to include dependencies defined in the `project.dependencies` array\n- `require-runtime-features` - set to an array of named dependency groups that are defined in `project.optional-dependencies`\n\n## License\n\n`hatch-mypyc` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
"bugtrack_url": null,
"license": "",
"summary": "Hatch build hook plugin for Mypyc",
"version": "0.15.0",
"split_keywords": [
"build",
"hatch",
"mypy",
"mypyc",
"plugin",
"typing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "43c752f30305ba7b49666523e35d74f7cd77dff55b0b69b77600b436ed44c557",
"md5": "65afa82dbaaea0fe95ab27fa9589264a",
"sha256": "a6ee44533edc5c12403ab950c085726041c0bd8c076ffaa11f6a9a9efc62025d"
},
"downloads": -1,
"filename": "hatch_mypyc-0.15.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "65afa82dbaaea0fe95ab27fa9589264a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 8483,
"upload_time": "2023-01-06T05:44:17",
"upload_time_iso_8601": "2023-01-06T05:44:17.647086Z",
"url": "https://files.pythonhosted.org/packages/43/c7/52f30305ba7b49666523e35d74f7cd77dff55b0b69b77600b436ed44c557/hatch_mypyc-0.15.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3e3c304fbd935ba016410b6795a71c7c2023bfb97f4fd90a1f1daa90f9a6f5e5",
"md5": "4120279e10c8ce07b5cbba7c8e85cbdf",
"sha256": "bda7c00b859ea163ce7a2f4f4ffe37c0932b28a4bf19806f40000678f9598eda"
},
"downloads": -1,
"filename": "hatch_mypyc-0.15.0.tar.gz",
"has_sig": false,
"md5_digest": "4120279e10c8ce07b5cbba7c8e85cbdf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 12832,
"upload_time": "2023-01-06T05:44:18",
"upload_time_iso_8601": "2023-01-06T05:44:18.804046Z",
"url": "https://files.pythonhosted.org/packages/3e/3c/304fbd935ba016410b6795a71c7c2023bfb97f4fd90a1f1daa90f9a6f5e5/hatch_mypyc-0.15.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-06 05:44:18",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "hatch-mypyc"
}