Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to compile with dependencies? #5
Great innovative tool.
Most python code uses 3rd party modules. How to compile those?
Example: I have a tool that imports configobj, after using
ConfigObj is pure python, so I thought it would have worked. I'm reading between the lines a bit here, but from the main readme it sounds like grumpy will only be looking for python modules where you're actually developing. So maybe moving the configobj *.py files into your dev directory it will act as if it were a module you made locally and then grumpy will pick it up.
Obviously this is not the ideal long term solution. Also I think ConfigObj needs Six, which is not in the grumpy lib dirs either. Maybe grumpy should be looking in
Indeed, moving the configobj *.py into the lib/ dir of the repo is a workaround that should work now. The "toolchain" is very primitive at this point so for real projects it's probably best to define your own workflow. The essential thing to know is that grumpc is the tool that converts Python -> Go. Then it's a matter of setting up your GOPATH appropriately so that the importing and imported Go packages line up correctly.
I'll update the README to include some examples.