File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 216216# Copy .pyi interface files and make them available as .py files
217217# path to .pyi files w/o having them installed
218218src_path = "../../src/python/impactx"
219- dst_path = os .path .join (
220- os .path .dirname (os .path .abspath (__file__ )), "_static/pyapi/impactx"
221- )
219+ api_path = os .path .join (os .path .dirname (os .path .abspath (__file__ )), "_static/pyapi" )
220+ dst_path = os .path .join (api_path , "impactx" )
222221if os .path .exists (dst_path ) and os .path .isdir (dst_path ):
223222 shutil .rmtree (dst_path )
224223shutil .copytree (src_path , dst_path )
235234
236235# insert into PYTHONPATH
237236sys .path .insert (0 , os .path .join (dst_path , ".." ))
237+
238+ # make archive for download of dependent Sphinx projects
239+ shutil .make_archive (dst_path , "zip" , dst_path )
240+
241+ # Download pyAMReX stub files
242+ url = "https://pyamrex.readthedocs.io/en/latest/_static/pyapi/amrex.zip"
243+ amr_path = os .path .join (api_path , "amrex.zip" )
244+ urllib .request .urlretrieve (url , amr_path )
245+ shutil .unpack_archive (amr_path , os .path .join (api_path , "amrex" ))
You can’t perform that action at this time.
0 commit comments