indygreg / PyOxidizer

A modern Python application packaging and distribution tool
Mozilla Public License 2.0
5.51k stars 239 forks source link

Make PyOxidizer build local rust project when it can find toml file #700

Open JulianZhang opened 1 year ago

JulianZhang commented 1 year ago

I am planning to mix Rust and Python in a new project. When I tried to build the demo project with cargo build , I found that the add_python_resource step was missing, causing some dependency files to be missing when running Python scripts. Using pyoxidizer build can create the correct Python runtime environment, but it always compiles the demo Rust project.

I found that the easiest solution is to modify some of the PyOxidizer code so that when there is a local project, it compiles the local project instead of creating a new demo. The current condition I have chosen is to find a toml file in the current working directory (CWD).

Can this change be considered for merging into the main branch?

JulianZhang commented 1 year ago

@indygreg Hi, I thank PyOxidizer is ready to build python env with user's rust project. And I also find there is another PR with same requirement 468.

But the 468 was blocked because failed in checks. If you thank the solution by 468 (use env) is better, I can write a new PR use that way, and fix all checking fails.