Hatch build hook plugin for Mypyc
Project description
hatch-mypyc
CI/CD | |
Package | |
Meta |
This provides a build hook plugin for Hatch that compiles code with Mypyc.
Table of Contents
Configuration
The build hook plugin name is mypyc
.
-
pyproject.toml
[tool.hatch.build.targets.wheel.hooks.mypyc] dependencies = ["hatch-mypyc"]
-
hatch.toml
[build.targets.wheel.hooks.mypyc] dependencies = ["hatch-mypyc"]
File selection
By default, all files included using the standard file selection options 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.
[build.targets.wheel.hooks.mypyc]
include = ["/src/pkg/server"]
exclude = ["__main__.py"]
Mypy arguments
You can specify extra Mypy arguments with the mypy-args
option.
[build.targets.wheel.hooks.mypyc]
mypy-args = [
"--disallow-untyped-defs",
]
Options
You can specify options
that affect the behavior of mypycify.
[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:
dependencies
- add more dependencies alongsidehatch-mypyc
require-runtime-dependencies
- set totrue
to include dependencies defined in theproject.dependencies
arrayrequire-runtime-features
- set to an array of named dependency groups that are defined inproject.optional-dependencies
License
hatch-mypyc
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hatch_mypyc-0.14.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea55e6ca4e96573d61dc53514755446b27b93ae56c77c377e72edcced624d306 |
|
MD5 | f2792d85b3934a3c06912b5c42135ecd |
|
BLAKE2b-256 | 781e02d36d52f9df7970d38c4cb292d32f636d3fef246a77a9c83da6bc8a5283 |