Generate Thrift stubs
(options)
| 158 | ('gen=', 'g', "Extra --gen option") |
| 159 | ]) |
| 160 | def thrift(options): |
| 161 | """ Generate Thrift stubs """ |
| 162 | |
| 163 | print "add import for TApplicationException manually as long it is not fixed" |
| 164 | |
| 165 | outdir = path("module") / "remote" / "thriftbackend" |
| 166 | (outdir / "gen-py").rmtree() |
| 167 | |
| 168 | cmd = [options.thrift.path, "-strict", "-o", outdir, "--gen", "py:slots,dynamic", outdir / "pyload.thrift"] |
| 169 | |
| 170 | if options.gen: |
| 171 | cmd.insert(len(cmd) - 1, "--gen") |
| 172 | cmd.insert(len(cmd) - 1, options.gen) |
| 173 | |
| 174 | print "running", cmd |
| 175 | |
| 176 | p = Popen(cmd) |
| 177 | p.communicate() |
| 178 | |
| 179 | (outdir / "thriftgen").rmtree() |
| 180 | (outdir / "gen-py").move(outdir / "thriftgen") |
| 181 | |
| 182 | #create light ttypes |
| 183 | from module.remote.socketbackend.create_ttypes import main |
| 184 | main() |
| 185 | |
| 186 | @task |
| 187 | def compile_js(): |
nothing calls this directly
no test coverage detected