Skip to main content

pdm-mypyc

pdm-mypyc is a build hook for pdm-backend to compile source files with mypyc.

Activate the hook

To enable the hook, simply add it to the build-system.requires:

[build-system]
requires = ["pdm-mypyc", "pdm-backend"]
build-backend = "pdm.backend"

Besides, you can also disable it temporarily by setting environment variable PDM_BUILD_WITHOUT_MYPYC to 1.

Configuration

Include and exclude files

By default, all .py files included by the tool.pdm.build configuration will be compiled with mypyc. You can override it with the includes and excludes settings under tool.pdm.build.hooks.mypyc table:

[tool.pdm.build.hooks.mypyc]
includes = ["src/**/*.py"]
excludes = ["src/**/tests/*.py"]  # these files will be excluded **in addition to** the excluded files in the build config

Mypy arguments

You can supply supported mypy command line options to the mypycify function with mypy-args setting:

[tool.pdm.build.hooks.mypyc]
mypy-args = ["--disallow-untyped-defs", "--disallow-any-generics"]

Options

You can specify options to pass to the mypycify function.

[tool.pdm.build.hooks.mypyc.options]
opt_level = "3"

Metadata

Release files for pdm-mypyc 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdm-mypyc 0.1.0
File Size Uploaded Provenance Actions
pdm-mypyc-0.1.0.tar.gz 3.7 kB Without provenance Details for pdm-mypyc-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pdm-mypyc 0.1.0
File Interpreter ABI Platform Actions
pdm_mypyc-0.1.0-py3-none-any.whl Python 3 none any Details for pdm_mypyc-0.1.0-py3-none-any.whl

Total release size: 7.4 kB

Release files / pdm-mypyc-0.1.0.tar.gz

Download URL pdm-mypyc-0.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2c8c3cbfa0594bbe476138e1d3682c254a3b6bec24311cf3eb8c30ee1dc0ffb8
BLAKE2b-256 checksum
How to use checksums
57961c3cf3017e57c1c99d95aa95f223595faa8a290413f22b5081ccf5ff1e28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / pdm_mypyc-0.1.0-py3-none-any.whl

Download URL pdm_mypyc-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a9fc27375495982c4acc46c691d6400aa6bbc03f90d70cfdfc423015d5f1c31
BLAKE2b-256 checksum
How to use checksums
3b4861e18919fed19240a3b1c6187f8b14d31478603f46080754972248746b0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Security for pdm-mypyc 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page