Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jan 22, 2026

Now all .c and .h files for librt.base64 live under mypyc/lib-rt/base64, for example.

This makes the structure easier to follow, since now the files for each submodule are in a dedicated directory. I'm planning to add some additional submodules soon, some of which have multiple files, so I think it makes sense to restructure now.

The extra ops files are still in the top-level mypyc/lib-rt directory, since they are linked to mypyc-compiled libraries instead of librt proper. We can revisit this later; I'm not sure what's the best approach.

I did this with claude code.

JukkaL and others added 2 commits January 22, 2026 12:12
Move librt_internal.[ch] into mypyc/lib-rt/internal/ and
librt_base64.[ch] into mypyc/lib-rt/base64/ to better reflect
that these files implement separate librt submodules.

Updated all references to point to the new locations:
- mypyc/codegen/emitmodule.py: updated include paths
- mypyc/build.py: updated source file paths
- mypyc/lib-rt/setup.py: updated source file paths
- mypy/cache.py: updated comment with new path

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit 8615d82 into master Jan 22, 2026
23 checks passed
@JukkaL JukkaL deleted the librt-restructure branch January 22, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants