13
13
is_repo = os .path .exists (os .path .join (project_root , ".git" ))
14
14
node_modules = os .path .join (node_root , "node_modules" )
15
15
targets = [
16
- os .path .join (here , "plotly" , "package_data" , "widgetbundle.js" ),
16
+ os .path .join (project_root , "plotly" , "package_data" , "widgetbundle.js" ),
17
17
]
18
18
19
19
npm_path = os .pathsep .join (
25
25
26
26
# Load plotly.js version from js/package.json
27
27
def plotly_js_version ():
28
- path = os .path .join (here , "js" , "package.json" )
28
+ path = os .path .join (project_root , "js" , "package.json" )
29
29
with open (path , "rt" ) as f :
30
30
package_json = json .load (f )
31
31
version = package_json ["dependencies" ]["plotly.js" ]
@@ -100,7 +100,7 @@ def run_codegen():
100
100
101
101
102
102
def overwrite_schema_local (uri ):
103
- path = os .path .join (here , "codegen" , "resources" , "plot-schema.json" )
103
+ path = os .path .join (project_root , "codegen" , "resources" , "plot-schema.json" )
104
104
shutil .copyfile (uri , path )
105
105
106
106
@@ -109,13 +109,13 @@ def overwrite_schema(url):
109
109
110
110
req = requests .get (url )
111
111
assert req .status_code == 200
112
- path = os .path .join (here , "codegen" , "resources" , "plot-schema.json" )
112
+ path = os .path .join (project_root , "codegen" , "resources" , "plot-schema.json" )
113
113
with open (path , "wb" ) as f :
114
114
f .write (req .content )
115
115
116
116
117
117
def overwrite_bundle_local (uri ):
118
- path = os .path .join (here , "plotly" , "package_data" , "plotly.min.js" )
118
+ path = os .path .join (project_root , "plotly" , "package_data" , "plotly.min.js" )
119
119
shutil .copyfile (uri , path )
120
120
121
121
@@ -125,13 +125,13 @@ def overwrite_bundle(url):
125
125
req = requests .get (url )
126
126
print ("url:" , url )
127
127
assert req .status_code == 200
128
- path = os .path .join (here , "plotly" , "package_data" , "plotly.min.js" )
128
+ path = os .path .join (project_root , "plotly" , "package_data" , "plotly.min.js" )
129
129
with open (path , "wb" ) as f :
130
130
f .write (req .content )
131
131
132
132
133
133
def overwrite_plotlyjs_version_file (plotlyjs_version ):
134
- path = os .path .join (here , "plotly" , "offline" , "_plotlyjs_version.py" )
134
+ path = os .path .join (project_root , "plotly" , "offline" , "_plotlyjs_version.py" )
135
135
with open (path , "w" ) as f :
136
136
f .write (
137
137
"""\
0 commit comments