Page 1 of 1

Quick code deployment

Posted: Tue Apr 23, 2019 5:43 pm
by Jongy
I'm working on a project that spans across multiple directories and dozens of files.

If you work on such a project that is compiled, build systems take care of what's work has to be done after you modify some sources, therefore the recompile process is usually quick, and finally redeploying/flashing a single binary is usually easy (Well, it's exactly one thing to do...)

However, back to a Python project, deploying lots of files to a remote board isn't so simple. Starting with the fact that there's no "sync directory" tools officially available (Or please enlighten me :)) so I had to hack a quick one that just copies the entire directory over webrepl, and that takes time and ain't feasible for quick development tests.

What I'd have liked is either to have a smart syncer that copies over only the files that were actually changed, or a mechanism to pack full sources into a single object, be it a single Python source / compiled bytecode /... (Basically like py2exe). I want to be able to make a single edit in a single file and see the whole application deployed within seconds.

Anyone had any progress on something similar? Or have an idea on how to achieve this with existing tools? Thanks.

Re: Quick code deployment

Posted: Tue Apr 23, 2019 8:10 pm
by dhylands
rshell has an rsync command...
https://github.com/dhylands/rshell#rsync

Re: Quick code deployment

Posted: Thu Apr 25, 2019 7:50 am
by Jongy
Cool, looks exactly like what I need.

For future reference, I've found this project which might be useful as well: https://github.com/pycampers/ampy.