24
24
type = str ,
25
25
help = 'Path to API specifications. Each must have a .stone extension.' ,
26
26
)
27
- _cmdline_parser .add_argument (
28
- '-s' ,
29
- '--stone' ,
30
- type = str ,
31
- help = 'Path to clone of stone repository.' ,
32
- )
33
27
34
28
def main ():
35
29
"""The entry point for the program."""
@@ -46,10 +40,6 @@ def main():
46
40
47
41
specs = [os .path .join (os .getcwd (), s ) for s in specs ]
48
42
49
- stone_path = os .path .abspath ('stone' )
50
- if args .stone :
51
- stone_path = args .stone
52
-
53
43
dropbox_pkg_path = os .path .abspath (
54
44
os .path .join (os .path .dirname (sys .argv [0 ]), 'dropbox' ))
55
45
if verbose :
@@ -60,25 +50,22 @@ def main():
60
50
subprocess .check_output (
61
51
(['python' , '-m' , 'stone.cli' , 'python_types' , dropbox_pkg_path ] +
62
52
specs + ['-a' , 'host' , '-a' , 'style' ] +
63
- ['--' , '-r' , 'dropbox.dropbox.Dropbox.{ns}_{route}' ]),
64
- cwd = stone_path )
53
+ ['--' , '-r' , 'dropbox.dropbox.Dropbox.{ns}_{route}' ]))
65
54
66
55
if verbose :
67
56
print ('Generating Python client' )
68
57
69
58
o = subprocess .check_output (
70
59
(['python' , '-m' , 'stone.cli' , 'python_client' , dropbox_pkg_path ] +
71
60
specs + ['-a' , 'host' , '-a' , 'style' , '-a' , 'auth' ] +
72
- ['--' , '-w' , 'user,app,noauth' , '-m' , 'base' , '-c' , 'DropboxBase' , '-t' , 'dropbox' ]),
73
- cwd = stone_path )
61
+ ['--' , '-w' , 'user,app,noauth' , '-m' , 'base' , '-c' , 'DropboxBase' , '-t' , 'dropbox' ]))
74
62
if o :
75
63
print ('Output:' , o )
76
64
77
65
o = subprocess .check_output (
78
66
(['python' , '-m' , 'stone.cli' , 'python_client' , dropbox_pkg_path ] +
79
67
specs + ['-a' , 'host' , '-a' , 'style' , '-a' , 'auth' ] +
80
- ['--' , '-w' , 'team' , '-m' , 'base_team' , '-c' , 'DropboxTeamBase' , '-t' , 'dropbox' ]),
81
- cwd = stone_path )
68
+ ['--' , '-w' , 'team' , '-m' , 'base_team' , '-c' , 'DropboxTeamBase' , '-t' , 'dropbox' ]))
82
69
if o :
83
70
print ('Output:' , o )
84
71
0 commit comments