Commit Graph

305 Commits

Author SHA1 Message Date
Hood Chatham 16db2158ff
Update docker image to bookworm (#4431)
Buster isn't available for anymore for Python 312 so we have to update.

This also updates to Python 3.11.7, which turns out to be relatively invasive. I broadly
xfailed failing tests in `python_tests.yaml` since we'll upgrade to Python 3.12 soon anyways.
2024-01-30 08:19:53 -08:00
Gyeongjae Choi d45733dc0c
DOC Replace minimal supported browser versions with tested browser versions (#4351)
[skip ci]
2023-12-25 09:39:20 +01:00
Gyeongjae Choi 4265d218ce
Drop node < 18 support (#4269)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-01 17:28:58 +01:00
Hood Chatham 3085cb9d5e Use Wasm Exceptions for invoke stubs if they exist (#3957)
If wasm exception handling is available, use dynamically generated modules
with wasm exception handling for the invoke stubs instead of a JS trampoline.
This is useful because JS trampolines interact poorly with JS Promise Integration.

In the future, we should switch exception handling ABIs to the compiler-provided
wasm exception handling ABI and we can remove this code. Currently we are
blocked on using compiler-provided wasm eh by Rust support.
2023-10-21 09:20:09 -07:00
Hood Chatham af7544cbbb
Add a no dynamic linking build option (#4203) 2023-10-14 12:13:27 -07:00
Hood Chatham 9345fb40d3
CI Use xcode 15.0.0 for Safari tests (#4211)
It seems that there is a bug in table instructions in Safari 16.3 which is used in the safari tests
but that Safari 16.4 has fixed it. xcode 15.0.0 uses Safari 16.6 which does not have the bug.
2023-10-10 16:53:39 -07:00
Gyeongjae Choi b067272878
CI Change macos resource class to gen2 (#4179) 2023-09-27 19:25:17 +09:00
Hood Chatham f28d8c9efc Revert JSPI Changes
This reverts commits:
9ed5e839ff
8861b317a6
b2c47ae766
ab8dc2eac6
3bcc527c92
2505d4d6a3
2023-09-14 07:26:46 -07:00
Hood Chatham 9ed5e839ff Use Wasm Exceptions for invoke stubs if they exist (#3957)
If wasm exception handling is available, use dynamically generated modules
with wasm exception handling for the invoke stubs instead of a JS trampoline.
This is useful because JS trampolines interact poorly with JS Promise Integration.

In the future, we should switch exception handling ABIs to the compiler-provided
wasm exception handling ABI and we can remove this code. Currently we are
blocked on using compiler-provided wasm eh by Rust support.
2023-09-13 16:22:07 -07:00
Gyeongjae Choi b41b9ea3d5
CI Split package build steps as a temporary solution for CI timeout (#4106) 2023-09-01 20:31:24 +09:00
Gyeongjae Choi 13d0e88dcc
CI Update macos env version in CircleCI (#4061) 2023-08-17 20:12:30 +09:00
Gyeongjae Choi b79b8913b9
Enable freesasa, lightgbm, opencv-python, and wordcloud (#3970) 2023-06-30 14:44:51 -07:00
Hood Chatham 5fe0d2e302
Change the name of repodata.json to pyodide-lock.json (#3824) 2023-06-18 22:57:43 -07:00
Hood Chatham 51c56ba645
Fix benchmark-stack-size (#3906)
This fixes benchmark-stack-size which seems to have been broken by the upgrade to pytest-pyodide 0.52.
2023-06-05 19:17:31 -07:00
Hood Chatham 5754d211be
Emscripten 3.1.33 (#3665)
Disabled opencv and lightgbm
2023-05-08 08:38:39 -07:00
Hood Chatham 4c34b6a468
Update node in docker image from v14 to v20 (#3819)
This updates the docker image to use node 20.1.0
2023-05-06 15:27:43 -07:00
Gyeongjae Choi 19886f8bd6
Make build variables accessible only through the API (#3765)
This PR makes build variables only accessible through the API, instead of polluting os.environ.

I also changed the API as below, as a preparation to move away from makefiles.

- `get_make_environment_vars` => `get_build_environment_vars`
- `get_make_flag` => `get_build_flag`
2023-05-06 17:17:22 +09:00
Gyeongjae Choi 17f199060b
Fix S3 xbuildenv deploy (#3782) 2023-04-20 11:34:22 +09:00
Gyeongjae Choi 25ba93485a
Deploy top-of-tree xbuildenv and pyodide-core to S3 (#3766) 2023-04-17 14:22:07 +09:00
Christian Clauss b2201c19b1
Upgrade to Python v3.11.3 (#3741) 2023-04-12 17:38:05 +02:00
Gyeongjae Choi 5a8ecf130a
Add `xbuildenv create` CLI command and remove old entrypoints (#3732)
Add a private pyodide xbuildenv create CLI commad that replaces pyodide-build create_xbuildenv. Also removes legacy entrypoints: `pyodide-build {create,install}_xbuildenv.
2023-04-07 20:54:11 +09:00
Roman Yurchak 7f4f66b34b
Deploy py-compiled build (#3701)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-03-29 22:54:46 +02:00
Roman Yurchak 8058cb6703
Support for py-compiling folders + repodata.json update (#3700)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2023-03-28 11:28:28 +00:00
Gyeongjae Choi fe8badf566
Fix compression of the dev deployment (retry) (#3698) 2023-03-25 11:33:16 +01:00
Roman Yurchak 096a834af3
Fix compression of the dev deployment (#3693)
Closes https://github.com/pyodide/pyodide/issues/3687

I forgot to make the changes for the dev deployment in
https://github.com/pyodide/pyodide/pull/3667
Overall those are mostly identical lines repeated several times, however
because the cost of error is pretty high I prefer not to factorize it
for now. Instead, we should rethink this system, maybe moving dev
deployment to a separate bucket and making release deployment immutable.
2023-03-25 10:08:02 +09:00
Roman Yurchak 601d939fdd
Fix wheel compression with the JsDelivr CDN (#3667)
Set the MIME type for wheels and zip files to application/wasm to enable CDN compression. Also optionally disable compression in zip files and wheels to make the brotli compression by the CDN more efficient.

Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2023-03-21 09:11:47 +01:00
Roman Yurchak 59b2c4e1ef
Remove deprecated pyodide-build buildall and mkpkg CLI endpoints (#3668) 2023-03-20 08:43:04 +01:00
Gyeongjae Choi a9182030cd
Merge pyodide_py into python_stdlib.zip (#3621)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-03-04 11:05:12 +01:00
Christian Clauss 154fbed9fa
Upgrade to Python v3.11.2 (#3614) 2023-03-01 23:57:17 +01:00
Gyeongjae Choi ed3ae1ba49
Download standard libraries in a zipfile (#3582) 2023-03-01 23:11:30 +01:00
Gyeongjae Choi 66812b8295
CI Show compressed size of main modules after build (#3526)
This adds a short helper script which shows a gzip and brotli compressed size of a file,
and uses it in CI to check compressed size of pyodide.asm.* after build in addition to
the original file size.
2023-02-03 21:25:38 -08:00
Gyeongjae Choi 328a9ffc34
Add tag key in meta.yaml spec (#3444)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-01-27 13:31:26 +09:00
Hood Chatham 2ab4b0ab6a
Install autoconf 2.71 in the docker image (#3515)
Upstream libffi requires autoconf 2.71, so we should use it too.
2023-01-26 19:30:13 -08:00
Hood Chatham 5e26d9f1ae
Build libpyodide.a (#3335)
This is work towards unvendoring the Pyodide foreign function interface. 

Prior to this point, we included a large amount of critical functionality with `--pre-js`.
So we could create an archive called `libpyodide.a` with the object files but to use it
you would have to pass `--pre-js _pyodide.out.js` at link time. This embeds all of this
stuff in an object file called `pyodide_pre.o` which goes in our archive so you get all
the needed js runtime by linking it. 

Of course someone trying to use this still has to get the Python code onto the import
path, either using `--preload-file`, using Python to unpack it as a zip archive as we now
do, with zipimporter, or otherwise. They also will have to link `libpython.a` (is CPython
going to start distributing an Emscripten libpython?) and probably various other things.

We have to use a hack to inject the JavaScript code into the object files. The normal
`EM_JS` macro cannot handle arbitrary JavaScript code -- for example it fails with many
regex. Instead we manually generate write a C source file that does what we need using
`xxd`. The generated C code is similar to what `EM_JS` generates, but it uses an array
initializer rather than a string initializer for the characters avoiding the C preprocessor /
compiler's strange opinions about strings.
2023-01-26 17:22:05 -08:00
Hood Chatham 3b2952fc92
Python3.11 (#3252) 2023-01-23 19:45:59 -08:00
Gyeongjae Choi ef112108c9
Add rust toolchain to the pyodide-env docker image (#3441)
This adds rust toolchain into our docker image so we don't have to install it every time.

make rust command still exists, but I removed it from the docs. So now a user (who wants to build a package that requires rust) is responsible for installing rust toolchain in their build setup, which is reasonable I think.

Co-authored-by: josephrocca <1167575+josephrocca@users.noreply.github.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-01-10 13:28:04 +09:00
Joe Marshall 4a1913d3ad
build packages from pypi direct (#3196)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2022-11-17 10:05:14 +09:00
Gyeongjae Choi d3b0d7f584
CI Move test-docs job to GHA (#3220) 2022-11-02 10:10:24 +01:00
Gyeongjae Choi 5e2688b37b
Bump docker image tag (#3221) 2022-11-02 16:25:27 +09:00
Gyeongjae Choi 25a341aab8
TST Fix jsexception test (#3202) 2022-10-25 10:31:38 +09:00
Gyeongjae Choi 7d3e19b0f6
Correctly specify files to be packed in a npm package (#3168) 2022-10-12 13:54:12 +09:00
Gyeongjae Choi 50f46358c2
CI Fix PyPI deploy (#3139) 2022-09-21 17:27:55 +02:00
Gyeongjae Choi 024dcbe8f0
CI Fix ccache in package build (#3104) 2022-09-21 09:30:09 +02:00
Gyeongjae Choi 69b2d3f157
Add debug build option for js package (#3129) 2022-09-21 14:20:08 +09:00
Hood Chatham 3765b51841
Fix pyodide venv install from local file system for pure Python packages (#3108)
Currently `pip` can't invoke the Pyodide build backend, but it should still be
able to build pure Python packages from source. To allow this, we need to
restore `_PYTHON_SYSCONFIGDATA_NAME` so that it isn't inherited by
subprocesses. Otherwise, they will fail to import `sysconfig` because the
subprocess doesn't have our altered `sys.path`. Annoyingly, when pip invokes
the subprocess it seems to pass `_PYTHON_SYSCONFIGDATA_NAME` down
but not `PYTHONPATH` so just setting the `PYTHONPATH` isn't good enough.
2022-09-18 09:21:02 -07:00
Hood Chatham a53bc5f571
Fix pypi deploy for patch releases (#3113) 2022-09-16 08:47:43 +02:00
Gyeongjae Choi edf175f013
TST Run package tests in Safari (#3095) 2022-09-14 09:13:53 +09:00
Hood Chatham c53e229175
Fix webpack warnings and reenable webpack test (#3094)
This uses sed to insert /* webpackIgnore: true */ comments into pyodide.js. 
This resolves #3087. I also enabled a check that a simple webpack config
builds without warnings. In the future it would be good to add a test that it
also runs without error.
2022-09-12 15:00:54 -07:00
Hood Chatham b6d3281d67
Add command to create Pyodide virtual environment (#2976)
Inside the generated virtual environment, `python` will use node to run Pyodide.
Pip can be used to install packages into the environment.
2022-09-12 11:18:40 -07:00
Hood Chatham da74f913f9
Use __dirname for indexURL in node, include source maps in release again (#3088)
Webpack generates a warning for missing source maps. This fixes it. 
See issue #3086.
2022-09-11 17:10:54 -07:00