perspective icon indicating copy to clipboard operation
perspective copied to clipboard

Switching between pyodide + regular python builds requires cleaning / rebuilding native artifacts

Open tomjakubowski opened this issue 1 year ago • 1 comments

Bug Report

little annoyance when switching between pyodide + native python development

Steps to Reproduce:

  1. create an "editable install" of perspective (pip install -e python/perspective)
  2. use the editable install somewhere (e.g. in a jupyter project)
  3. run a pyodide build
  4. editable python install is broken because .so is WASM, not mach-o (or what ever)

ImportError: dlopen(/Users/tom/perspective/perspective/python/perspective/perspective/table/libpsppy.so, 0x0002): tried: '/Users/tom/perspective/perspective/python/perspective/perspective/table/libpsppy.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/tom/perspective/perspective/python/perspective/perspective/table/libpsppy.so' (no such file), '/Users/tom/perspective/perspective/python/perspective/perspective/table/libpsppy.so' (not a mach-o file)

the remedy is to rebuild all the python so a native (mach-o in my case) .so is at that path, instead of an emscripten/wasm .so

Expected Result:

pyodide build + native python build are independent and their compiled artifacts do not interfere with one another

Actual Result:

ImportError: dlopen(/Users/tom/perspective/perspective/python/perspective/perspective/table/libpsppy.so, 0x0002): tried: '/Users/tom/perspective/perspective/python/perspective/perspective/table/libpsppy.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/tom/perspective/perspective/python/perspective/perspective/table/libpsppy.so' (no such file), '/Users/tom/perspective/perspective/python/perspective/perspective/table/libpsppy.so' (not a mach-o file)

Environment:

latest master, macos 13.3.1

Additional Context:

I propose separating C++ build artifacts in our working tree by target architecture

tomjakubowski avatar Nov 08 '23 01:11 tomjakubowski

Wouldn't this also be true of different python versions?

timkpaine avatar Nov 09 '23 19:11 timkpaine