After a bit of fiddling around, I got everything to work in Part 2 and I'll share the issues I found and resolved here.
#1: The src/build/afterExtract.js python copy folder function doesn't seem to work.
Update: This is a pathing issue it seems. The source folder should have the additional \edtwExample\ to reach the actual dist folder. Your Github repo adds a parent folder with .bat files which makes the existing path invalid.
#2: I found other pathing issues that make it not work right out of the box.
For example, the edtwExample.spec in the python folder points to edtwExample\manage.py, but the manage.py is in the same folder as the spec file.
#3: The spawn command for production doesn't seem to run properly. I got a number of issues, but the approach I write here in "Edit" works.
Edit: The previous way didn't work all the time. Here is a guaranteed way.
const serverPath = path.join(app.getAppPath(),"..","..","python", "edtwExample.exe")
const command = "${serverPath}" runserver --noreload;
return spawn(command, {
shell: true,
});
You need a stable path to work from. spawn on Node.js is based on the path your command line is calling processes from.
I used app.getAppPath().
James Sugjin Kahng