Commit Graph

2373 Commits

Author SHA1 Message Date
Gyeongjae Choi 6214bafe5d
BLD Retry when package download fails (#3157) 2022-10-05 14:23:13 +09:00
Gyeongjae Choi dc5096bfcb
PKG add libheif, pyheif, and pillow_heif (decoder only) (#3161)
This adds libheif and Python packages that use libheif to support HEIC image format.

Note that this is "decoder" only. libheif use libde265 for decoder and libx265 for encoder, and I only added libde265 in this PR. I think decoding is more important in our use case, hence this PR.
2022-10-05 11:41:35 +09:00
Gyeongjae Choi 825a01e3af
Add options to disable integrity check in pyodide.loadPackage (#3149)
This PR adds an option to disable integrity check in `pyodide.loadPackage` when it is loading packages registered in repodata.json.
2022-10-05 08:32:11 +09:00
Gyeongjae Choi d2fce73291
Prevent backend-flags from propagating to dependencies (#3153) 2022-10-04 08:57:24 +09:00
Gyeongjae Choi 90e20badd7
Prevent from searching meta.yaml recursively inside extracted package source directory (#3162)
This fixes the behavior of searching meta.yaml recursively inside the extracted package source directory.
It sometimes cause error on packages that contain local meta.yaml file due to conda support.
2022-09-30 15:09:45 +09:00
Gyeongjae Choi 83ba807b10
Handle shared libraries with version suffix (#3154) 2022-09-30 11:06:41 +09:00
Gyeongjae Choi 7dfee03a82
ENH Add API for mounting native file system (#2987)
This PR adds an API pyodide.mountNativeFS which mounts FileSystemDirectoryHandle into a Pyodide Python file system.

Note that there are some limitations such as:

- File System Access API is only supported by Chromium-based browsers (Safari also implements a portion of it but they only support Origin Private File system so it is not very useful for common users).
- The file system is asynchronous, so one needs to call syncfs to persist changes.

Since it is asynchronous, it does not require any WebWorker, SharedArrayBuffer, or Atomics. But I think we can extend this to a synchronous version using those features
2022-09-30 09:24:53 +09:00
Hood Chatham 51803cae8c
Add capture_this keyword argument to create_proxy (#3145)
A followup to #3103. Allows creation of proxies from Python with `captureThis` set to `true`.
2022-09-29 01:27:49 -07:00
Gyeongjae Choi d8910dd03f
Bump mypy version to 0.981 in pre-commit config (#3159) 2022-09-29 13:30:48 +09:00
Hood Chatham 5f643fffb5
Fix cmdline runner when stdout doesn't have columns/rows attributes (#3156) 2022-09-29 10:41:20 +09:00
Gyeongjae Choi 8f8b107415
Add import hook for packages registered in repodata.json (#3137) 2022-09-28 09:05:00 +09:00
Yizhi Liu f28bf95c84
Add lightgbm package (#3138) 2022-09-27 10:14:11 +09:00
pre-commit-ci[bot] 8260b9f41f
[pre-commit.ci] pre-commit autoupdate (#3152)
updates:
- [github.com/asottile/pyupgrade: v2.38.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.38.0...v2.38.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-27 10:09:50 +09:00
Gyeongjae Choi a1b72c6fa3
DOC Remove warnings about pyodide-cdn2.iodide.io (#3150)
[skip ci]
2022-09-26 09:46:19 +02:00
Hood Chatham 9a3365a6d0 Revert "0.22.0a1"
This reverts commit 13526ac8ff.
2022-09-24 18:37:03 -07:00
Hood Chatham 13526ac8ff 0.22.0a1 2022-09-24 18:36:46 -07:00
Gyeongjae Choi c54328cb1b
Use pyodide-cli entrypoint for out-of-tree CLI (#3140) 2022-09-24 18:34:36 -07:00
Roman Yurchak 0b4d73fa3e
Include micropip from a separate repository (#3122) 2022-09-24 13:02:17 +02:00
Hood Chatham cf3f355306
Add descr_get handler to JsMethod (#3130) 2022-09-23 00:36:38 +02:00
Gyeongjae Choi a916ea0b34
BLD simplify building CMake based packages (#3128)
This PR makes building CMake based packages easier.
- Introduce a custom toolchain file for Pyodide. It inherits most of settings from the original Emscripten toolchain file with some modifications. Packages built by pyodide-build will automatically use that toolchain file.
- Proxy cmake in pywasmcross.py, in order to proxy other compiler toolchains.
2022-09-22 10:42:26 +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 55ff2e3ba5
DOCS Make docs wider (#3136) 2022-09-20 21:03:18 -07:00
Hood Chatham 32ccd545b4
Add bcrypt (#3125) 2022-09-20 13:46:43 +09:00
Hood Chatham 1a66912341
Add support for passing 'this' to Python (#3103)
Some people have expressed the difficulty that certain JavaScript frameworks
use `this` in critical ways and so a `PyProxy` callback cannot be handed to them
because there is no way for the `PyProxy` to get access to the `this` argument.
See #2901 for example. The goal of this PR is to address this. We cannot always
pass `this` through because usually it isn't useful. So the idea is to add an internal
setting on the `PyProxy` indicating whether it should be passed and some way to
set this setting. Currently I've added a method called `captureThis` which indicates
that `this` should be passed as an argument to Python.
2022-09-19 20:32:39 -07:00
Will Lachance aac2eede0a
Update pandas to 1.5.0 (#3134)
This removes a single patch which has since been upstreamed.
2022-09-19 19:18:02 -07:00
pre-commit-ci[bot] d9d6144a8b
[pre-commit.ci] pre-commit autoupdate (#3133) 2022-09-19 16:34:24 -07:00
Gyeongjae Choi 968f2c6f36
Keep webpackIgnore comments when building js package (#3132)
It adds terser config to not strip `/* webpackIgnore */` comments instead of
using sed after build.
2022-09-19 09:28:54 -07:00
Hood Chatham b0dc19e4a1
Use upstream chrono for cryptography (#3124)
Since Chrono made a release fixing the Emscripten target we don't need the Chrono patch anymore.
2022-09-18 20:58:53 -07:00
Hood Chatham 09af24b3b5
DOCS Add docs for out of tree builds (#3109) 2022-09-18 17:36:12 -07: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
Aierie 4b2191ebd6
Allow use with (module-type) service workers (#3070) 2022-09-17 21:35:32 -07:00
Hood Chatham a53bc5f571
Fix pypi deploy for patch releases (#3113) 2022-09-16 08:47:43 +02:00
John Wason fd54f86136
Fix Robot Raconteur -Wenum-constexpr-conversion build error (#3105) 2022-09-15 20:44:00 -07:00
Hood Chatham 0eb6036b85
Update to emscripten 3.1.21 (#3107) 2022-09-15 16:58:14 -07:00
Hood Chatham 7b3b2e8b8c Fix changelog format 2022-09-15 16:24:07 -07:00
Hood Chatham 4fc2d02ccb Update changelog for v0.21.3 release 2022-09-15 15:38:38 -07:00
Hood Chatham a44cb5254f Add missing PR # to changelog 2022-09-15 10:56:02 -07:00
Hood Chatham 18124b53b2
Fix `PyProxy.apply` when `args` is undefined (#3101) 2022-09-15 09:27:41 +02:00
Hood Chatham aa4d22341a
DOCS Add faq entry on importlib.invalidate_caches (#3102)
[skip ci@
2022-09-14 21:19:43 +02:00
Hood Chatham fc8503d2de
Add create_index to create a pypa simple index and use it with xbuildenv (#3096)
Pyodide virtual environments created from release versions of Pyodide
will use this package index to install packages from jsdelivr.
2022-09-13 20:19:01 -07:00
Gyeongjae Choi ba5162ca77
ENH Simplify shared library loading process (#2954)
Instead of calling `loadWebAssemblyModule` and saving it to 
`preloadedWasm`, directly call `loadDynamicLibrary` with proper
`fs` args to locate other shared libs that are dependent.
2022-09-13 17:17:08 -07:00
Gyeongjae Choi edf175f013
TST Run package tests in Safari (#3095) 2022-09-14 09:13:53 +09:00
pre-commit-ci[bot] efcca8be91
[pre-commit.ci] pre-commit autoupdate (#2928) 2022-09-13 15:12:40 -07:00
dataxerik 9af9bee60b
DOCS add docstring examples for eval_code (#3090)
part of #1955
2022-09-13 10:31:52 -07:00
Gyeongjae Choi 2dc937c0b6
Enable libhdf5 and h5py (#2812) 2022-09-13 16:17:52 +09:00
Gyeongjae Choi c3a0ddb0c7
Add a version variable for Pyodide JavaScript Package (#3074) 2022-09-13 13:42:05 +09:00
Gyeongjae Choi 6d5de461a5
Proxy ranlib and strip (#3082) 2022-09-13 13:19:44 +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