Commit Graph

173 Commits

Author SHA1 Message Date
Gyeongjae Choi 555f7828f4
Parse top-level import name from wheel file (#3006) 2022-09-06 15:20:04 +09:00
Hood Chatham 525b5a1785
Update scipy to 1.9.1 (no meson) (#3043)
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
2022-09-04 22:39:32 -07:00
Gyeongjae Choi e4bc821d35
Raise error when static libraries are specified as a runtime dependency (#3055) 2022-09-04 12:53:09 +02:00
Gyeongjae Choi 09aa16a9a0
Load packages in a topologically sorted order (#3020)
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.
2022-09-02 10:19:42 +09:00
Hood Chatham e6e7d56752
MAINT Remove custom setuptools_rust commit (#3045) 2022-08-30 17:29:25 -07:00
Gyeongjae Choi 6964672556
Fix incorrect package name of ruamel.yaml (#3036) 2022-08-30 16:25:13 +09:00
Gyeongjae Choi ad128337e8
Unpin setuptools version (#3010) 2022-08-24 08:32:26 +02:00
Gyeongjae Choi b4433e1b4a
Do not load unvendored stdlibs by default (#2998)
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>
2022-08-23 11:52:27 +09:00
Roman Yurchak 62de53f5a8
Add build dependencies to meta.yaml (#2132)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2022-08-22 13:35:27 +09:00
Gyeongjae Choi 26535e33cd
Unvendor sqlite3 from stdlib (#2946)
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>
2022-08-22 08:52:50 +09:00
Gyeongjae Choi 5b35c272a0
Fix emscripten version check test (#2990) 2022-08-20 02:56:20 +02:00
Hood Chatham b1ab8f0de4
Add an Emscripten version check for out of tree builds (#2975)
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.
2022-08-18 09:28:10 +02:00
Gyeongjae Choi 26e45657a7
MAINT Build test and distutils stdlib modules with pyodide-build (#2979) 2022-08-18 13:55:16 +09:00
Gyeongjae Choi 6acd1dd02b
Add an import hook for unvendored and removed stdlibs (#2973) 2022-08-17 22:03:21 +02:00
Gyeongjae Choi 757b54e398
Pin setuptools version temporarily (#2972) 2022-08-16 11:32:03 +09:00
Gyeongjae Choi b497ce26ed
Add lzma (#2939) 2022-08-11 17:52:23 +09:00
Hood Chatham 3eef0ed275 Bump version to 0.22.0.dev0 2022-08-09 21:49:23 +02:00
Gyeongjae Choi 5e412795ed
0.21.0 (#2935) 2022-08-09 15:36:10 +02:00
Hanno Rein 8a9feaac51
Add REBOUNDx package (#2909) 2022-08-08 14:02:43 +02:00
Gyeongjae Choi 88232d7639
BLD Pin cmake version temporarily (#2945) 2022-08-08 11:23:44 +09:00
Hood Chatham 4c8d99451b
Report wrong checksum when there is a checksum mismatch in a package build (#2943) 2022-08-06 12:41:11 +09:00
Roman Yurchak c85e00806b
MAINT Switch to pytest-pyodide (#2893)
Co-authored-by: ryanking13 <def6488@gmail.com>
2022-07-31 19:00:45 +09:00
Gyeongjae Choi 5d72fd427e
Pin cython version temporarily (#2920)
cython 0.29.31 is incompatible with scipy 1.8.1.
2022-07-29 12:55:50 +09:00
Gyeongjae Choi 06d82f9e42
Do not strip -shared flag when building packages (#2897) 2022-07-26 15:48:36 +09:00
Gyeongjae Choi 8182c63b5f
Remove pymalloc check (#2899) 2022-07-23 10:58:22 +09:00
Gyeongjae Choi 9d874d588b
MAINT Update pre-commit config (#2890) 2022-07-19 16:43:12 +01:00
Gyeongjae Choi 1b4b028993
BLD Ignore runtime lib flag on linking (#2848) 2022-07-10 12:11:03 +02:00
Hood Chatham ffd070a55e
0.21.0a3 (#2859) 2022-07-10 11:58:30 +02:00
Hood Chatham 88313f76d5
Change out of tree build entrypoint name from pywasm to pyodide (#2858) 2022-07-10 11:31:53 +02:00
Hood Chatham cdb457bf5b
Add xbuildenv to github releases (#2850)
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.
2022-07-10 10:58:39 +02:00
Hood Chatham 03a05ab36d
Finish out of tree build system (except xbuildenv deploy) (#2823)
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.
2022-07-06 14:37:19 -07:00
Hood Chatham 686426ab39
Respect symbol visibility in export calculation (#2821)
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.
2022-07-04 11:32:36 -07:00
Gyeongjae Choi 9fbb2972eb
Remove freetype and png from the main module (#2813) 2022-07-04 09:11:55 +02:00
Hood Chatham 61c062f5aa
Remove replace_libs (#2822)
We don't use this feature anymore.
2022-07-02 06:53:16 -07:00
Hood Chatham b0a28579bf
Fix pywasmcross when pyodide_build is installed out of tree (#2824)
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.
2022-07-01 22:00:27 -07:00
Hood Chatham 52287a179d
More work on create_xbuildenv to allow building numpy (#2811)
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.
2022-07-01 11:20:45 -07:00
Hood Chatham c5636c02a1
Add type annotations to many functions (#2810) 2022-06-29 23:08:46 -07:00
Hood Chatham 9b7693a95a
ENH Pass pywasmcross environment more carefully (#2738)
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).
2022-06-29 17:52:09 -07:00
Hood Chatham 49807b699c
ENH Add flag to run bash script in cross build environment (#2734)
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.
2022-06-27 21:05:53 -07:00
Hood Chatham 61ef0813ad
Micropip: Improve error message when attempting to load wheel with wrong platform (#2783)
If the wheel is an Emscripten wheel of the wrong version, give the expected
 version and the wheel version. Otherwise, complain about platform mismatch.
2022-06-27 20:59:53 -07:00
Hood Chatham 63516c3e83
Add Python version to repodata (#2786) 2022-06-24 21:21:26 -07:00
Hood Chatham cd40765cc1 Revert "0.21.0a2"
This reverts commit c540ce9b9c.
2022-06-24 08:05:36 -07:00
Hood Chatham c540ce9b9c
0.21.0a2
This has to be alpha2 because I seem to have accidentally
published an alpha1 to npm.
2022-06-24 06:15:13 -07:00
Hood Chatham 19b2dcf77b
Fix error message for invalid exports meta.yaml key (#2777) 2022-06-23 21:23:47 -07:00
Hood Chatham fac51bdcf0
Default to -sSIDE_MODULE=2 in packages (#2712)
Drops the size of the dist directory from 271mb to 226 mb which is a 17% size reduction.
2022-06-23 07:15:21 -07:00
Hood Chatham be331255f7
Pass -Zlink-native-libraries=no when building Rust (#2753) 2022-06-21 08:21:33 +02:00
Roman Yurchak 8de2a04ab0
API Rename packages.json to repodata.json (#2749)
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
2022-06-20 14:46:11 -07:00
Hood Chatham 060f1f4ba6
MAINT Use the patched version of setuptools-rust (#2735) 2022-06-20 09:28:19 +09:00
Gyeongjae Choi ef5f80bf07
Change shared library installation directory (#2721)
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.
2022-06-16 16:31:16 -07:00
Hood Chatham 2d056ed253
Add support for backend flags to buildpkg (#2690)
And use it to disable numpy optimization by passing the `--disable-optimization` 
flag instead of patching numpy.
2022-06-13 16:40:48 -07:00