Skip to content

py_compile!/py_freeze! macros should emit call(s) to include_bytes! to force recompilation when input file(s) changes #5065

Open

Description

@chris-laplante

Summary

I noticed that when using py_compile!, Cargo doesn't recompile my application when the referenced Python file changes. I think that py_compile! should emit a call to include_bytes! so that recompilation happens. py_freeze! could do the same.

Would you accept a PR to implement this? I have locally tested a fix for py_compile! already.

Activity

  1. youknowone commented on Oct 5, 2023

    @youknowone
    Member

    Hi! I am sorry for late response. I hadn't thought of using include_bytes! for this purpose before. That sounds reasonable to me. Could you please make a PR for it? Thank you!

  2. chris-laplante commented on Oct 5, 2023

    @chris-laplante
    Author

    Hi! I am sorry for late response. I hadn't thought of using include_bytes! for this purpose before. That sounds reasonable to me. Could you please make a PR for it? Thank you!

    Sure thing, will do! :)

  3. YashSuthar983 commented on Oct 25, 2025

    @YashSuthar983
    Contributor

    is this still open?

  4. youknowone commented on Oct 30, 2025

    @youknowone
    Member

    @YashSuthar983 Yes, it is

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

    C-bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions