{"id":13600078,"url":"https://github.com/ofek/hatch-mypyc","last_synced_at":"2025-09-03T22:31:53.916Z","repository":{"id":37984363,"uuid":"441994050","full_name":"ofek/hatch-mypyc","owner":"ofek","description":"Hatch build hook plugin for Mypyc","archived":false,"fork":false,"pushed_at":"2024-06-30T16:49:35.000Z","size":70,"stargazers_count":38,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-23T19:10:26.643Z","etag":null,"topics":["build","hatch","mypy","plugin","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ofek.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["ofek"],"custom":["https://ofek.dev/donate/"]}},"created_at":"2021-12-26T22:18:48.000Z","updated_at":"2024-11-25T04:20:13.000Z","dependencies_parsed_at":"2024-01-16T23:26:20.674Z","dependency_job_id":"63c00783-2210-4154-b1a4-a868388621e8","html_url":"https://github.com/ofek/hatch-mypyc","commit_stats":{"total_commits":61,"total_committers":4,"mean_commits":15.25,"dds":"0.16393442622950816","last_synced_commit":"5a198c0ba8660494d02716cfc9d79ce4adfb1442"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ofek%2Fhatch-mypyc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ofek%2Fhatch-mypyc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ofek%2Fhatch-mypyc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ofek%2Fhatch-mypyc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ofek","download_url":"https://codeload.github.com/ofek/hatch-mypyc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231922974,"owners_count":18446517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","hatch","mypy","plugin","python"],"created_at":"2024-08-01T18:00:22.487Z","updated_at":"2024-12-30T23:18:27.830Z","avatar_url":"https://github.com/ofek.png","language":"Python","funding_links":["https://github.com/sponsors/ofek","https://ofek.dev/donate/"],"categories":["Plugins"],"sub_categories":[],"readme":"# 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\u0026label=PyPI\u0026logoColor=gold)](https://pypi.org/project/hatch-mypyc/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-mypyc.svg?logo=python\u0026label=Python\u0026logoColor=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\u0026style=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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofek%2Fhatch-mypyc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fofek%2Fhatch-mypyc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofek%2Fhatch-mypyc/lists"}