grumpyhome / grumpy

Grumpy is a Python to Go source code transcompiler and runtime.
Apache License 2.0
420 stars 18 forks source link

pip installation "grumpy compile" is not working #137

Closed akamensky closed 5 years ago

akamensky commented 5 years ago
$ grumpy compile -modname=mmm_test test_mmm.py 
Usage: grumpy compile [OPTIONS] [FILE]
Try "grumpy compile --help" for help.

Error: Invalid value for "[FILE]": Could not open file: compile: No such file or directory
$ ll
total 1136
-rw-r--r-- 1 akamenskiy Domain Users      0 Aug 15 13:42 __init__.py
-rw-r--r-- 1 akamenskiy Domain Users   4619 Aug 15 13:53 test_mmm.py
$
alanjds commented 5 years ago

The compile command does not exist. You can transpile or run.

The message you got is because grumpy whatever is interpreted as grumpy run whatever to ease the compatibility with CPython python whatever.

There is a flag on grumpy run to produce a binary instead of just running the Py code. If this is what you are searching for, please take a look on grumpy run --help.

Please feed back on this issue also if you get to success on what you are trying to do :)

Thanks.

akamensky commented 5 years ago

I actually were looking for transpiling functionality. TBH the docs are very unclear on how to transpile from Python to Go...

alanjds commented 5 years ago

Yeah. It is. SHOULD be reworked and updated :/