Skip to content
Browse files

remove list of server name

  • Loading branch information...
1 parent 9534b11 commit 5237de6607a9cdf08f1b1d49bdc1231d83c7f5a5 @rimms rimms committed Oct 1, 2012
Showing with 7 additions and 8 deletions.
  1. +7 −8 tools/generate_clients.py
View
15 tools/generate_clients.py
@@ -4,11 +4,11 @@
import tarfile
import shutil
import re
+import glob
-def generate(idl, lang, indir, outdir):
-
+def generate(idlfile, lang, outdir):
+ idl = os.path.splitext(os.path.basename(idlfile))[0]
print("generating {0}.{1}".format(idl, lang))
- idlfile = idl+".idl"
options = []
if lang == "cpp":
options.append("-p")
@@ -30,7 +30,7 @@ def generate(idl, lang, indir, outdir):
pass
outdir = outdir + '/' + idl
- cmd = ["mpidl", lang, indir + idlfile, '-o', outdir] + options
+ cmd = ["mpidl", lang, idlfile, '-o', outdir] + options
# print(cmd)
subprocess.call(cmd)
print(outdir)
@@ -65,15 +65,14 @@ def pack(name, version, outdir):
indir = sys.argv[1] + "/"
langs = ["haskell", "cpp", "ruby", "java", "php", "perl", "python"]
- servers = ["classifier", "regression", "recommender", "stat"]
- comb = [(s, l) for s in servers for l in langs]
+ idlfiles = glob.glob(indir + "*.idl")
for lang in langs:
outdir = "jubatus"
try: os.mkdir(outdir)
except: pass
- for server in servers:
- generate(server, lang, indir, outdir)
+ for idlfile in idlfiles:
+ generate(idlfile, lang, outdir)
name = "jubatus-%s" % lang
pack(name, version_string, outdir)

0 comments on commit 5237de6

Please sign in to comment.
Something went wrong with that request. Please try again.