Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add script that prints compiled files when self compiling#19260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 2 commits intomasterfromself-compile-files-script
Jun 9, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletionsmisc/self_compile_info.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
"""Print list of files compiled when compiling self (mypy and mypyc)."""

import argparse
import sys
from typing import Any

import setuptools

import mypyc.build


class FakeExtension:
def __init__(self, *args: Any, **kwargs: Any) -> None:
pass


def fake_mypycify(args: list[str], **kwargs: Any) -> list[FakeExtension]:
for target in sorted(args):
if not target.startswith("-"):
print(target)
return [FakeExtension()]


def fake_setup(*args: Any, **kwargs: Any) -> Any:
pass


def main() -> None:
parser = argparse.ArgumentParser(
description="Print list of files compiled when compiling self. Run in repository root."
)
parser.parse_args()

# Prepare fake state for running setup.py.
mypyc.build.mypycify = fake_mypycify # type: ignore[assignment]
setuptools.Extension = FakeExtension # type: ignore[misc, assignment]
setuptools.setup = fake_setup
sys.argv = [sys.argv[0], "--use-mypyc"]

# Run setup.py at the root of the repository.
import setup # noqa: F401


if __name__ == "__main__":
main()

[8]ページ先頭

©2009-2025 Movatter.jp