Skip to content

TypedPython: embed a package-relative source path, not the host's absolute path #112

Closed

Description

@b-re-w

cgen embeds tp_source_path as the absolute host path of the module (it becomes the compiled code's filename in tracebacks). Two builds of the same source on different machines therefore produce different C and different extensions, and the build path leaks into the artefact. pypackpack's compile slot (pypackpack #33, Q4) relies on byte-identical outputs for the manifest SHA-256 used by code push.

Change: embed the module's path relative to the project/package root (app/physics/nbody.py).

Done when: a test builds the same module from two different absolute roots and the generated C is byte-identical; a traceback from interpreted fallback code names the relative path.

Activity

  1. b-re-w commented on Oct 3, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #133.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions