This updates scipy to v1.9.1. This was mercifully easy:
* for now we disable meson
* we dropped `patches/0014-BUG-Fix-signature-of-D_IIR_forback-1-2.patch` since it was upstreamed
* we had to add a patch to put fitpack back into a shape that makes f2c happy
* we need one more `-Wincompatible-function-pointer-types` fix upstream PR: https://github.com/scipy/scipy/pull/16934
This commit changes how we load packages.
Before, we loaded all shared libraries first then all Python packages.
All shared libraries / Python packages were loaded in a random order,
which might cause a problem if there is a load-time dependency between libraries or between packages.
Now we load them in a topologically sorted order regarding dependencies.
As discussed in #2940, this PR changes the default value of the fullStdLib flag in loadPyodide to false.
This is a breaking change because for now distutils is not loaded by default.
Also, when fullStdLib is set to true, it loads all unvendored stdlibs except for test.
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Unvendor the standard library sqlite3 to reduce the size of the main module. It reduces the size of pyodide.asm.wasm around ~1.4MB.
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
The out of tree build system applies an abi tag based on `PYODIDE_EMSCRIPTEN_VERSION`
in `Makefile.envs`. Prior to this PR, it will happily accept the version of emscripten (say 3.1.18)
and produce a wheel tagged like it was produced from the expected Emscripten version (say 3.1.14).
This causes confusing errors due to ABI mismatch see igraph/python-igraph#560. This error message
should help prevent such confusion.
This adds a step that generates an xbuildenv to the circleci CI and
deploys it to github releases when we make a release. I also updated
the url in download_xbuildenv to point to github releases.
This completes the out of tree build CLI. This PR is paired up with:
numpy/numpy#21895
I have also successfully built scikit-learn, statsmodels, pandas, and
astropy with this.
The last thing we need to do after this is set up deployment of the
cross build environment. We can deploy one version to s3 for each
tagged commit. I will do that in a separate PR after this is merged.
We shouldn't export symbols with `__attribute__((visibility("hidden")))`. Numpy has
a test to check that symbols with this attribute aren't exported. This fixes that test.
Symlinking cc to pywasmcross.py only works if pywasmcross.py has
execute permissions. When we install the package with pip, it will not
set execute permissions on pywasmcross.py. It does set execute flags
on entrypoints. Thus, define an entrypoint called _pywasmcross which
calls pywasmcross.main. If a script called _pywasmcross exists, we are
using an out-of-tree install so symlink cc to _pywasmcross. Otherwise,
we should be in tree and pywasmcross.py should have the execute flag
set, so symlink cc to pywasmcross.py.
On the other side, if __main__.__file__ is in a folder named pyodide_build
or bin we are being invoked normally, otherwise we are being invoked via
a symlink.
This is more WIP on create_xbuildenv. I am including some of the WASM_LIB_DIR
but not all of it to keep size in check. The current cross build environment that we
would upload/download is 20mb.
To use this, we need an extra CLI entrypoint which I am working on.
This is on top of #2734. Other build environments cannot be trusted to pass our
environment variables down #2736. We store key variables into a json file in a
temporary directory with the symlinks. If these variables are not in `os.environ`
we load them from disk.
In addition to the added generality, this also has the advantage that it makes it
much easier to debug specific compiler invocations from the build script because
the environment is stored to disk (that is, if we override the deletion of the
temporary directory by manually adjusting the code).
This script will run with the target environment variables and
sysconfigdata and with the pywasmcross compiler symlinks.
Any changes to the environment will persist to the main build
step but will not be seen in the post step (or anything else
done outside of the cross build environment). The working
directory for this script is the source directory.
If the wheel is an Emscripten wheel of the wrong version, give the expected
version and the wheel version. Otherwise, complain about platform mismatch.
Closes#2747
* renames packages.json to repodata.json
* renames the corresponding JS and Python variables to be a bit more explicit.
Tangentially related to #795
Change shared library installation directory from /lib/python3.10/site-packages/ to /usr/lib.
#2686 and this PR improve how we load shared libraries. The future goal
of these PRs is to load shared libraries on demand, instead of pre-loading
all shared libraries, which will reduce initial package load time.