1313is_repo = os .path .exists (os .path .join (project_root , ".git" ))
1414node_modules = os .path .join (node_root , "node_modules" )
1515targets = [
16- os .path .join (here , "plotly" , "package_data" , "widgetbundle.js" ),
16+ os .path .join (project_root , "plotly" , "package_data" , "widgetbundle.js" ),
1717]
1818
1919npm_path = os .pathsep .join (
2525
2626# Load plotly.js version from js/package.json
2727def plotly_js_version ():
28- path = os .path .join (here , "js" , "package.json" )
28+ path = os .path .join (project_root , "js" , "package.json" )
2929 with open (path , "rt" ) as f :
3030 package_json = json .load (f )
3131 version = package_json ["dependencies" ]["plotly.js" ]
@@ -100,7 +100,7 @@ def run_codegen():
100100
101101
102102def 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" )
104104 shutil .copyfile (uri , path )
105105
106106
@@ -109,13 +109,13 @@ def overwrite_schema(url):
109109
110110 req = requests .get (url )
111111 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" )
113113 with open (path , "wb" ) as f :
114114 f .write (req .content )
115115
116116
117117def 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" )
119119 shutil .copyfile (uri , path )
120120
121121
@@ -125,13 +125,13 @@ def overwrite_bundle(url):
125125 req = requests .get (url )
126126 print ("url:" , url )
127127 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" )
129129 with open (path , "wb" ) as f :
130130 f .write (req .content )
131131
132132
133133def 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" )
135135 with open (path , "w" ) as f :
136136 f .write (
137137 """\
0 commit comments