indygreg / PyOxidizer

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

Edit-build-run loop when modifying Python is a bit cumbersome #296

Open bbqsrc opened 4 years ago

bbqsrc commented 4 years ago

Every time I modify Python code, if I want it to be included in the build while testing, I have to delete build and do cargo clean or the new modifications aren't picked up.

Is there a cleaner approach?

indygreg commented 4 years ago

I agree that the edit-build-run loop here is a bit lacking. I have a few ideas to address this:

You could work around this today with a few dozen lines of custom code using the oxidized_importer Python API. See https://pyoxidizer.readthedocs.io/en/stable/oxidized_importer_freezing_applications.html for inspiration. You could build an executable that runs a file which invokes oxidized_importer to scan for new resources and make them available to the interpreter. Startup time would be slow due to the dynamic resource scanning. But it would likely be faster than building/linking a new binary!