clever-hamburger-5971603/01/2023, 9:22 PM
Okay, i'll start by adding numpy to
Traceback (most recent call last): File "runpy", line 197, in _run_module_as_main File "runpy", line 87, in _run_code File "pushdown_service.service", line 15, in <module> File "db_dtypes", line 22, in <module> File "numpy", line 125, in <module> File "numpy.__config__", line 9, in <module> NameError: name '__file__' is not defined
. Still, no dice.
Wait a minute, it's there!
Traceback (most recent call last): File "numpy.core", line 23, in <module> File "numpy.core.multiarray", line 10, in <module> File "numpy.core.overrides", line 6, in <module> ImportError: libopenblas64_p-r0-15028c96.3.21.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "runpy", line 197, in _run_module_as_main File "runpy", line 87, in _run_code File "pushdown_service.service", line 15, in <module> File "db_dtypes", line 22, in <module> File "numpy", line 141, in <module> File "numpy.core", line 49, in <module> ImportError: ...
Looking at pyoxidizer docs, it seems one needs to add
soda$ ls dist/service_bin/x86_64-unknown-linux-gnu/debug/install/lib/numpy/libs/libopenblas64_p-r0-15028c96/3/21.so dist/service_bin/x86_64-unknown-linux-gnu/debug/install/lib/numpy/libs/libopenblas64_p-r0-15028c96/3/21.so
is in the search path. In https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/python/packaging/pyoxidizer/config.py I see that this is not done. Am I missing something? Is this expected/are the default parameters expected to work without this config? I can try generating the wheel in pants and then going to pyoxidizer and trying to get this to work; however, would prefer to stay within pants if possible. p.s: I also tried -keep-sanboxes=always to see if I can hack the
file and couldn't find one.
target works well for all cases I checked except with a dependency on
; seems to be an issue with PyOxidizer. I went ahead and created this for repro: https://github.com/csnatarajan/pants-pyoxy Using the template params (
policy.allow_files = True
, `policy.file_scanner_emit_files = True`; policy = PythonPackagingPolicy) seems necessary. On a different note though, the lib (filesystem-resource) it produces is 100M and the binary is 200M+; this is bordering on criminal for using (only) numpy as a dependency! TIme to checkout scie!
policy.include_file_resources = True