I was able to run my grumpc transpiled code by making changes to the file generated by grumpc. I had to change the package name to main and add a main function that used πg.RunMain(Code). Maybe I'm missing some option or flag to make this the default behavior? I also updated my issue with the changes
For simple one-file module it can work. For complex ones, you can run 1st time via grumpy -v debug run --keep-main myfile.py
and the last logs do show the produced main and the GOPATH you need to use
Ah I see now. Is there currently a built in way to bring this main.go file with all its dependencies into the current folder instead of the temp one and set the gopath appropriately?
This would break the __pycache__
magic a lot, leading to lengthy re-transpilations. But is possible
Maybe grumpy build -o hello hello.py will be possible in the future
Hehe. PRs are welcome ;)
from '__go__/time' import Local, Now
_mymodule.py
and import it from mymodule.py
. Then on the _
one only you use the non-standard stuff.
grumpy-runtime
and grumpy-tools
. The transpiler lives in grumpy-tools
.
gumpy transpile script.py
and grumpy run script.py
this way