Commit Graph

283 Commits

Author SHA1 Message Date
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
Roman Yurchak 4dd8a3e0cb
Switch to meta.yaml parsing with pydantic (#3079) 2022-09-11 09:20:56 +02:00
Gyeongjae Choi 0333d1fa36
CI Fix pytest runtime option syntax (#3084) 2022-09-08 22:39:42 +09:00
Roman Yurchak f3ba7865b2
Run core tests in Safari (#2578)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2022-09-08 10:43:55 +09:00
Gyeongjae Choi 7010d26853
TST Benchmark package load time (#3030) 2022-08-30 09:50:59 +09:00
Hood Chatham 88881d7c2b
Improvements to indexURL (#3015)
Fix indexURL:
1. when it's a relative path
2. when `--enable-source-maps` is used
This resolves #2764.
2022-08-27 22:17:51 -07:00
Hood Chatham 53a4f840dc
Add extra minimal release, also add xbuildenv to artifacts (#2999) 2022-08-24 14:22:33 -07:00
Hood Chatham 345131074c
Rename released bundle from pyodide-build.tar.gz to pyodide.tar.gz (#2996) 2022-08-21 17:36:00 -07: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 14708295cd
TST Fix location of the package import test file (#2926) 2022-08-04 10:05:30 +02: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
Roman Yurchak 922d135c71
Enable codecov (#2871) 2022-07-15 09:41:15 +01:00
Roman Yurchak ebea82caff
Use CircleCI security context for S3 deployment (#2870) 2022-07-15 08:41:44 +01:00
Gyeongjae Choi b38e16b677
CI Remove package source files after build (#2862) 2022-07-13 17:30:58 +09:00
Gyeongjae Choi 2f1c197007
CI Fix xbuildenv deploy (#2866) 2022-07-12 18:14:41 +09:00
Gyeongjae Choi 1fc2fc4256
CI Split up package test jobs (#2852)
This PR splits package test in CI so that no-numpy-dependents packages can be tested earlier. In detail, pytest will now save test results into its cache directory, and if --skip-passed option is given, it will skip previously successful tests.
2022-07-11 09:52:38 +09: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
Gyeongjae Choi 7d7b7e899d
TST Make `pyodide-test-runner` installable (#2742) 2022-07-04 09:07:01 +02:00
Gyeongjae Choi 5935e5c7f9
Add sqlite3 binary to the docker image (#2807) 2022-06-30 13:22:03 +09:00
Hood Chatham f209485eda
Fix some details in the debug build (#2804) 2022-06-29 08:52:32 +09:00
Hood Chatham 5fd96f9b27
Try again with deploying debug version (#2801)
I guess there has to be some trial and error with these. Since we
can't link `pyodide.asm.js` in the deploy docker image, we do it in
a separate step after `build-packages`. Because we have hard
coded `dist` everywhere, it's a little bit awkward building into
`dist-debug`. I do some rearrangements with `cp` and `mv` to hack
around this.
2022-06-28 10:16:23 -07:00
Hood Chatham 46d75f3272
Deploy a debug version of Pyodide to the CDN (#2800) 2022-06-28 08:04:55 +02:00
Hood Chatham 598688eeba
Trigger pypi deploy from circleci (#2782) 2022-06-24 21:19:04 -07:00