Skip to content

Commit edfb24d

Browse files
authored
GH-49426: [Python] Do not build pyarrow-stubs on emscripten builds (#49427)
### Rationale for this change The emscripten job is currently failing due to pyarrow-stubs building. ### What changes are included in this PR? - Do not build doc stubs for emscripten build as it tries to install pyarrow which is unavailable. - Minor fix for chrome as it was timing out without being able to download wasm wheel. - Fix loading tzdata as some tests were failing without it. ### Are these changes tested? Yes via archery. ### Are there any user-facing changes? No * GitHub Issue: #49426 Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Rok Mihevc <rok@mihevc.org>
1 parent c187333 commit edfb24d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

python/scripts/run_emscripten_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def end_headers(self):
116116
def run_server_thread(dist_dir, q):
117117
global _SERVER_ADDRESS
118118
os.chdir(dist_dir)
119-
server = http.server.HTTPServer(("", 0), TemplateOverrider)
119+
server = http.server.HTTPServer(("127.0.0.1", 0), TemplateOverrider)
120120
q.put(server.server_address)
121121
print(f"Starting server for {dist_dir} at: {server.server_address}")
122122
server.serve_forever()
@@ -280,6 +280,7 @@ def _load_pyarrow_in_runner(driver, wheel_name):
280280
if "pyarrow" not in sys.modules:
281281
await micropip.install("hypothesis")
282282
import pyodide_js as pjs
283+
await pjs.loadPackage("tzdata")
283284
await pjs.loadPackage("numpy")
284285
await pjs.loadPackage("pandas")
285286
import pytest

python/setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ def run(self):
126126

127127
def _update_stubs(self):
128128
"""Copy stubs to build directory, then inject docstrings into the copies."""
129+
if is_emscripten:
130+
# stubs are not supported in Emscripten build
131+
return
129132
stubs_dir = pjoin(setup_dir, 'pyarrow-stubs')
130133
if not os.path.exists(stubs_dir):
131134
return

0 commit comments

Comments
 (0)